Anchors/links within pages

I really need to link from one iWeb page to an anchor inside another, but can't figure out how or if this can be done. To see what I mean, go here:

http://web.mac.com/wildwing1/Recipes/Index.html

What I want to do is make an anchor on each of the recipes in the other pages, then link this page to each of them by name so people can click on each recipe name and go directly there instead of having to search each page. I'd also like to link each recipe to a printable file, but think I may have figured that one out.

I used to work in GoLive and Photoshop, and while I like iWeb and iPhoto a lot more they do seem more constricting in areas like this.

Thanks in advance,

Suzanne

2006 iMac, Mac OS X (10.5.2)

Posted on Feb 26, 2008 4:52 AM

Reply
13 replies

Feb 26, 2008 5:50 AM in response to Wildwing

Wyodor is right in that it does not do anchors but you might workaround that. Look at this page and click on the words on some of the tabs like journaux or dictionnaires see what happens.
This is done with an iframe.
I can see how you might with a little imagination create a page where the different recipes would give the impression to have open on that word but in reality would be opening in their own window.
check it out and see how you could adapt it.
mireillegreen.com
Mireille

Feb 26, 2008 7:27 AM in response to Wildwing

Hi Suzanne,

have a look at the following page for a tutorial about how to add anchors to iWeb:

http://alyeska.altervista.org/en/iWeb_Anchors.html

(the following will be clearer if you try the tutorial)
In your case...
only "Where the chapter starts, thus where you want people to be pointed to from the index, add a 2 to the code, thus PagenameChapternumber2"
and "Note1" at the end of the page is needed
you could also put no text instead of TextToBeDisplay in this code
<*a name="label">Text to be displayed<*/a> +(without *)+
thus keep the title you already have

If something in the tutorial is not clear please post back and I'll try to make it clearer.

Regards,
Cédric

(as Cyclosaurus pointed out elsewhere editing pages post-publishing may hurt .Mac comments but as far as I can see you're not using those...)

Feb 26, 2008 8:08 AM in response to Wildwing

Hi wildwing,
I did a quick page to show you how you could show your recipes just by clicking on the title of it.
I did not spend time formating the frame or anything I just used the latin text that we often find.
click on the blue words lorem varius and you will see your recipes appear in the box.
If you want to see the page itself click on the purple square it will take you there.
http://www.mireillegreen.com/anchors/anchors/About_Me.html
Mireille

Feb 26, 2008 10:43 AM in response to Wildwing

Anchors are not directly supported in iWeb, but there are numbers of work-around.
Post editing gets old real quick, especially when you like to have many anchors as in your site.

From looking at your Recipes pages, they are long windows, so the easiest thing to do is to have a javascript to scroll to the right spot when the window is open, I made sample of your pages - I only made three anchor links:

http://hdl.50webs.com/Anchors1/From.html

In the From.html page, the text links need to be added as link to an external page (in inspector); so you can specify the full path including the anchor, eg:

http://hdl.50webs.com/Anchors1/To.html#1

The scrolling script is attached to the To.html page using HTML Snippet, see its source code of the following:
http://hdl.50webs.com/Anchors1/Tofiles/widget1markup.html

You need to fill in the anchors array with the Y position of each recipe.

Feb 27, 2008 5:55 PM in response to Wildwing

I forgot one thing, the easy way to find those Y positions in your pages, that can be done with AppleScript and Safari.
Launch AppleScript: /Applications/AppleScript/Script Editor and copy&paste the following:

tell application "Safari"
do JavaScript "
pageYOffset;
" in document 1
end tell

Now open your page in Safari, scroll down to the first recipe; switch back to AppleScript and click Run button or keyboard Command+R ; the scroll position will be displayed in result box; that is your #1 position.

Repeat the process for all your recipes.
Hint: the bottom of your page, inspector -> page layout -> content height is your next Y position for your next recipe.

Mar 5, 2008 5:57 PM in response to Cyclosaurus

Thanks so much to everyone for all their help, but this has turned out to be far more complicated than I have time to deal with right now. When I get a little extra time I'll try these suggestions, but the main reason I use iWeb is to make quick and dirty web pages with little fuss, muss, and time. What a disappointment that it's not included with the basic program.

One last question: Where can you find the raw pages on the computer? I went looking and even when I looked in the iWeb package I couldn't find them.

Thanks again,

Suzanne

Mar 5, 2008 6:19 PM in response to Wildwing

Hi Suzanne,
I have been playing with Cyclosaurus solution as well and I did not get it to work. but then I am not very good with code either. I have spent quite a bit of time on it, and I was just about to give up and use the iframe when your message poped up.
I really think that the iframe would work for your purpose. Just post again when you are ready to work on it we'll help.
I am not sure what you mean about the raw pages. do you mean your iweb file? If so it is in this path
Home/Library/Application Support/iWeb.
Good luck to you
Mireille

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Anchors/links within pages

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.