Bill,

Thanks for the reply. Yes, I would be getting the data from a SQL statement.

Let me explain what I am trying to achieve.

I want to structure my site like this :

http://mysite.com/Members/<username

so if someone comes to my site with the URL :

mysite.com/Members/Ian

They would see the Members page for "Ian" (we'll ignore permissions and
security for now).

As I have said before, one way of doing this is to have a Zope structure :

/Members
               /Ian
               /Jim
               /Jane

Where Members is a folder, Ian,Jim and Jane are Sub-folders of Members.

But I don't want to do this. What if I add a million users?  Then I end up
with a million member folders which is difficult to manage from Zope. I want
to store my users in a database.

I have no problem creating a DTML method which calls a SQLMethod passing a
parameter "username=Ian" to pull out the data and construct the HTML for
delivery.

The problem I have is how to construct my site. What I want is something
like :

/Members
               /*

Where * is a method which catches the rest of the url (/Ian) and does all
the necessary processing to return the formatted user page for Ian.

I know I'm missing the Zope Zen of this because it must be easy to do in
such a well thought-out product.

The thought I had was that "Members" could be a SQL method which takes
"username" as a parameter, Ian then is passed in as that Username and the
necessary data is pulled from the DB. This is fine except that I still need
some other method to render the HTML page for delivery to the user and this
would extend my url to : www.mysite.com/Members/Ian/rendermethod.

The other problem with this is that it clutters the root with the Members
SQLMethod and the rendermethod DTML document. I might start adding more
URL's like : www.mysite.com/Members/Ian/preferences or
www.mysite.com/Members/Ian/pastposts and the "preferences" and "pastposts"
documents would end up in the root too. All these things belong in a Members
folder, not at the root.

I'm missing something important, I'd appreciate any enlightenment you could
bring to this.

- Ian.










----- Original Message -----
From: "Bill Anderson" <[EMAIL PROTECTED]>
To: "Ian Sparks" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 06, 2000 10:32 AM
Subject: Re: [Zope] www.mysite.com/Members/<someone>


Ian Sparks wrote:
>
> I have the source here, perhaps you can point me to where I should be
> looking - the PTK is reasonably large.
>
> AFAICS the PTK uses a folder called Members and adds folders under that
for
> each registered user :
>
> Members
>    Fred
>       FredContent1
>       FredContent2
>       FredContent3
>    Jim
>       JimsContent
>
> Nothing database-driven about that.


See below...

...

> >I want to produce a home-page on my site using a URL like :
> >
> >http://www.zope.org/Members/Fred
> >
> >
> >I'm a little confused as to how I would go about this in a dynamic way
> where
> >I would pull the contents of the page out of a database.
> >
> >A non-database way would be to :
> >
> >/Members (folder)
> >    /Fred (sub-folder or Document)
> >    /Jim (sub-folder or Document)
> >    /Jane (sub-folder or Document)
> >
> >But I want to be able to generate the /Members/Fred page dynamically.


What exactly would you generate this off of?

I would guess from data in a databse (SQL)?

If so, you could do a select statement to ge tthe userlist.
You would then make a 'template' that built a page from the data in a
database, where username==username (ie Fred).

But, you could be asking for something completely different. ;)

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )





_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to