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) setattr(myClass, 'Content_Main', Content_Main) if REQUEST is not None: return self.Template_index_html(self, REQUEST) 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? Thanks, Mike
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
participants (2)
-
Chris Withers -
Michael Long