HTML anchor using DTML?
Hi, I'm designing a static HTML pages using DTML. Basically each page is divided into 2 sections, the header and the content. such as: <dtml-var services-navig.htm> <dtml-var services-cont.htm> In some pages, the content is too long, and they are divided into some sub-content which is linked through sub-header. The website is: http://www.gem.com.sg/services.htm For the above examples, there are 3 subheaders: 'Laboratory', 'consultation' and 'onsite' If I click on the subheading, I want it to display immediately on top of the page. I can use 'Anchor' if I use the HTML FRAME But how to do this in DTML? regards, Heri
For the above examples, there are 3 subheaders: 'Laboratory', 'consultation' and 'onsite' If I click on the subheading, I want it to display immediately on top of the page. I can use 'Anchor' if I use the HTML FRAME
But how to do this in DTML?
The short answer is "exactly like you do it in HTML". (Remember, DTML is for generating HTML.) Meaning it's an HTML question. I think. If you simply want the page page to scroll such that the heading is at the top when you click on it, put a named anchor above the heading, and wrap the heading in a link anchor referring to the named anchor. Something like: <a name="somewhere" /> <a href="#somewhere"><h1>Heading 1</h1></a> If you want the heading to link to a page with only that heading's contents on it, it goes something like #main page <dtml-var header> <dtml-var section1> <dtml-var section2> <dtml-var section3> <dtml-var footer> #section1 <a href="&dtml-id;"><h2>Section 1</h2></a> ...contents... and so forth. I suspect you were asking about the first scenario, though, which really isn't a Zope question at all. --jcc
participants (2)
-
Herianto Tan -
J Cameron Cooper