PDA

View Full Version : Anchors and links within/between brochure pages


NickD
03-Mar-2003, 03:30 PM
Hi

I want to be able to have, at the top of my homepage, a series of links to other parts of the same page, which I assume would be done with source and destination anchors. Does anyone know how to do this so it works correctly both live on the site and in preview modes?

Also, can we jump between pages in this way?

All input gratefully received.

Nick

zmagyar
03-Mar-2003, 09:01 PM
I think the best way if you check out the w3c page about anchors. See http://www.w3.org/TR/REC-html40/struct/links.html

Regards,

Zoltan
Actinic

pinbrook_nick
04-Mar-2003, 12:44 AM
The basic syntax for anchors is:

link to anchor on same page:
<a href="#fred">Jump to Fred</a>

link to anchor on another page:
<a href="/acatalog/another_page.html#fred>Jump to Fred on another page</a>

anchor code:
<a name="fred">This is the first line of the Fred item.</a>


Most actinic fields require the follwing code to denote embedded html segments:

!!< your html code - can be on several lines >!!

As far as paths and live and preview modes are concerned, your best bet is to play around. Chances are you will have to make do with paths that work live, but not in preview. (such as the /acatalog/another... path above.

NickD
04-Mar-2003, 02:04 PM
Hi Guys

Thanks very much for input on that - this was most useful. However, a couple of minor niggles remain....

Niggle 1 - when jumping between pages, I don't seem to be able to jump to an anchor somewhere in the body of the jumped-to page - it always goes to the top of the page. I've checked the syntax meticulously and I don't think there's an error. Jumps within the destination page work fine (ish - see niggle 2). Any ideas?

Niggle 2 - Imagine a brochure page made up of loads of fragements. Imaging we want to link from the top of the page to a fragment say halfway through the overall page. If the fragment has a title and then text, and we insert the anchgor code in the text box, then when you jump to the anchor, you jump to the start of the text and the title disappears off the top of the screen. Is there a way we can jump such that the anchor is effectively at the start of the title, so this is shown?

pinbrook_nick
04-Mar-2003, 10:34 PM
Niggle 1: Post your code, and I'll have a look.

Niggle 2: Try putting the code in the fragment title, such as this:

!!<<a name="frag2">Frag2</a>>!!

pinbrook_nick
05-Mar-2003, 01:50 PM
Niggle 1 (checked):

link to anchor on separate page:
!!<<a href="acatalog/trade_info.html#trade_enq">Jump to trade enquiries info</a>>!!

anchor code on separate page (in fragment title):
!!<<a name="trade_enq">Trade Enquiries</a>>!!

Note: the index.html page gets put at the site root, all other pages are put in the acatalog folder.

Happy coding! :cool: