Hi there -

Let's see if I can describe my problems.

First, imaginary directory structure:

Context1/
         styles/
                sitestyles.css
         Main.py
         staff/
               Welcome.py
               Email/
                     Send.py

Now, say all these pages (Main.py, Welcome.py, Send.py)
inherit from my SitePage, which defines writeStyleSheet()
to include the sitestyles.css file. How do you manage the
relative nature of this URL as the pages descend into
directories?

Option 1: each page defines a function/accessor that
returns the appropriate relative prefix to get back to root
("../", "../../"). Anytime I need a site-wide relative url,
prepend self.dots() to the site-root relative url. However,
this currently breaks if I use application.forward() (for
example, as SecurePage does), as it is the forwarded page's
dots() method that is called.

Option 2: set a request(?) variable in awake for the
relative prefix, then prepend that (or have dots() return
that). If it already exists, don't set it (so that the
forwarded page doesn't overwrite). Set this in awake for
the class. Is there any problem concern I'm not thinking
about in setting a request field?

Or some third option that hasn't occurred to me yet. How do
you deal with this?

Luke

=====
------------------
Reference Counting Garbage Collection:
Look out philosophy majors, things really DO
cease to exist when no one is looking at them!
------------------

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to