[Zope] Site navigation

Chris Withers chrisw at nipltd.com
Thu Sep 25 08:34:20 EDT 2003


Michael Long wrote:
> Hi,
> 
> I have a product where I am using the following method to display a page:
> 
> def index_html(self, REQUEST=None):
> 	"Method to show my web page"
> 	Content_Main = PageTemplateFile('showMyPage.pt', _wwwdir)

This should be outside the method body, otherwise you're compiling the page 
template every time you call this method, and you don't want to be doing that ;-)

> 	setattr(myClass, 'Content_Main', Content_Main)

eep!

> 	if REQUEST is not None:
> 		return self.Template_index_html(self, REQUEST)

Where does Template_index_html come from?

> I would like to modify this to have it duplicate the behavior of the
> following url:
> 
> http://www.mysite.com/myClass/index_html#myID
> 
> Where myID is defined in showMyPage.pt by 
> <p id="myID"> some text </p>
> 
> How would I accomplish this?

You can't really. Jumping to an id is something doen by the browser.

Why do you want to?

Chris




More information about the Zope mailing list