How do I link to an anchor on another page?

RW 6.3.1, Foundation Theme, Stacks 2.5. Trying to make Joe Workman’s Links & Anchors (or just Anchor, actually) work to link from a regular URL text link on one page of my site to an anchor on another page. I have tried installing the Link Anchor but I can’t find any code to put into the Link box that takes me to that anchor. Specifically, on my Home page, I say, “…you should take a clinic” and “take a clinic” is a URL that I want to take me to an anchor that sits right over a header on my “Links” page (page 2 in the site). The Anchor says I should put in “href=#clinics” (“clinics” being the name I have assigned the anchor) and I guess this means that I put in the entire URL to the page and then “=#clinics” but maybe I am interpreting that wrong. Have tried every permutation I can think of. How do I do this? Thanks.

Possible that I have done it right but RW won’t take me to the anchor. Maybe I have to save or even publish to get it to work? But I’d just as soon not do that until I know how to do it.

gary,

Try prefacing ‘#clinics’ (which you’re right about!) with the full URL.

So the link should read something like:

http://www.yoursite.com/anotherpage#clinics

Good luck…

Thanks much, but that did not work, either. I made sure I did it exactly as you have it here. Got a 404 error while working in RW edit and, just to make sure, I published it and tried it with Safari and got a 404 error there, too. So, put that link back to where it was, just a link to the page, instead of the specific anchor.

Maybe if I could put the anchor link right into the code, it would work but there is something about the Workman Anchor stack that does not. At least not without some tweak that remains a mystery to me.

Apparently, that is an old stack (it’s a free download, as I recall). The tutorial video for it on the Workman site is out of date.

gary,

I’m sorry that did not work.

When you got the 404, what page did it say was unable to be found/did not exist?

The text in that error message is always a good clue as to how the link has been constructed - and usually reveals what may be wrong… such as something like:

http://www.mysite.com/mysite.com…

Is this the Stack which you’re using?

I’m not familiar with it. But the principle is the same: to link to a page you use:

<a href="http://www.site.com/page.html">link to a page text</a>

etc. And to link to an anchor

<a href="http://www.site.com/page.html#anchor">link to an anchor on a page text</a>

If you can add those links in RW in the usual way - setting on one side for test purposes the particular Stack in question - and that does not work, then something else is going on… possibly a simple syntax error.

Have you a live example, please?

Have you tried this;

href=“#clinics

The quote marks should surround “#clinics

Cheers,
OldGreyThing

@gary555: It would be much easier to sort this out if you provided us with the link. I know you can’t get the specific anchor to work, but give us a link to the page, then tell us about where the anchor is on that page. That will help us tremendously to help you.

You also mention that it is on “page 2” on the site. I hope that’s not the name of the page, but if it is it could be that space between page and 2 that is causing the problem.

Thanks. Tried that. Got the same 404.

Thanks. No, the name of the page is “Links”. Right now, the link is just linked to the page itself, via the RW links box. And that actually works fine, in this case, since the spot on the page I would like to link to is right near the top of that page, anyway. But I would like to learn to use this Anchor, or some anchor method, for other internal links.

The website is http://austinracewalkers.com . The link is on the Home page, near the bottom – the text “take a clinic”. Where I put the anchor was on the Links page (the next page, which I called “page 2” at some point), near the top, right over the header that reads “Two Racewalking Clinics”.

But if I can figure how to do this, I will do some other internal links to spots on my Links and Tips pages buried down in the text.

Thanks. Yes, that is the stack I am trying to use. The Anchor part of the Links and Anchor Stack set from Joe Workman. When you say “add those links to RW in the usual way”, what, exactly, do you mean by that? My usual way is to use a stack to do it. I used to add some code many years ago when I was using other software with other operating systems but since RW I have not.

The error message I get every time, for every permutation of these suggestions I can come up with, is:

Not Found The requested URL/links.html was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at www.austinracewalkers.com Port 80

Tried using quotes and not quotes. “.html” and not. Every other change I can think of. Of course, there is one simple thing I am doing wrong causing all this problem. Can’t find it, so far, though.

@gary555: Okay, that further description helps. What I see at the relevant anchor (Two Racewalking Clinics) is this:

<h4 class="text-left   small-only-text-center">Two Racewalking Clinics</h4> 

Put in plain English: there is no anchor there! So I don’t think your link is necessarily bad. There’s also no reason to put the anchor “right above” anything. Put it right at the relevant header. (Headers are really the easiest to link to, both for you and the end-users).

I don’t know how you created that header, but as an example you could rewrite it in HTML so it looks like this:

<h4 id="two-clinics" class="text-left   small-only-text-center">Two Racewalking Clinics</h4>

In this case your link (from whatever page/location) would be:

http://austinracewalkers.com/page2#two-clinics

I’m just giving the general idea, and there may be a typo in what I’ve written (I’m still waking up). Linked is a general explanation of how to do this in PDF form:
https://infinit.io/_/hFQFrsp

@gary555: I tried to respond with relevant code and a PDF primary. But my response got marked as spam and is under review. Who knows when it will appear.

Bottom line is it looks like you have not installed an anchor: so there is nowhere for your link to go to. But more details will be provided whenever my original reply is “okayed”

OK, here is how the link should look
http://austinracewalkers.com/page2/#anchor-link-name

…as the link itself. And on the page there should be - exactly where you want it, ideally around a head, as Mathew suggests- something based on this:

<a name="clinics">Target of the link in a header, where you want them to land</a>

So, setting any Stacks to do this on one side - for testing purposes at least - the page with the link in itself might have code like this in it:

Go to the <a href="http://www.mysite.com/linkspage.html#clinics">clinics</a> link.

And the page on which you want them to land as result of following your link on the first page would have code similar to/based on this in it:

<a name="clinics">Thanks for coming to clinics</a>

Surrounding the linked text.

BTW, gary - I notice that the forum software is cutting off the extreme right of (longer) code snippets/quotes. Be sure to copy them all by selecting any portion, then Cmnd-A, then Copying them to TextEdit or similar before viewing. Good luck!

Not sure why you have to do all of that, if he is using Joe’s Anchor stack, just use the link as I suggested.

The bottom line is none of these approaches will work if there isn’t an anchor!

Gary stated his anchor was placed just above Two Racewalking Clinics on this page:
http://austinracewalkers.com/page2/

When I use inspect element I’m not seeing any anchors placed there, or near there. So Gary it looks like you first need to insert an anchor stack on Page2 at the relevant location. Give it a name you want in the Anchor stack (e.g. “clinic”).

Here is my site that works great with the anchor stack and the URL structure I supplied. As @Mathew mentioned, you NEED an anchor stack for it to work.
http://www.zeebedesigns.com/anchor-199/

Oh Yes, if the Anchor Stack, works - use it by all means.

My explanation was to help show how anchors work. Good luck either way :slight_smile: !

quote Zeebe" @Mathew mentioned, you NEED an anchor stack for it to work."

GARY: Well, I thought I was putting the Joe Workman Anchor stack in there as instructed. But maybe not. Their instruction video for that old stack is outdated and I can’t tell much about it. Seems straightforward though. I have asked them about it.

GARY: Evidence seems to be there is some problem with my use of the Anchor stack.

Matthew: "as @Mathew mentioned, you NEED an anchor stack for it to work.
GARY:Thought I had one.

GARY: Yeah, exactly, that’s what I thought.

GARY: OK, that’s the form I will use.

Gary: Well by putting the anchor “above the header” I mean I pull in the anchor stack right above the header stack. I have no idea how this looks on the page of code. BUT–if you were looking at my published site, you are right, there is no anchor there. I returned it to the way it was, with the “clinics” link just linking to the Links page, via the RW link box. I did not want to have the screwed up link on the published page. I only meant to show where it was supposed to go, not where it had gone, on the published site. If necessary, I will make a test area on the published site and try this that you can then look at. Sorry about that confusion.

NOW, COULD THIS BE THE PROBLEM?
I think I may have found the problem or at least A problem. I have 3 pages. Looking at the page inspectors, I see for the Home Page (menu=Home), no browser title, no folder and filename = index.html. For the menu=Links page, I see no browser title, folder = page 2 and filename index.html, on the third and last page (menu = Tips) I see no browser title, folder “page0”, filename index.html. Now what I THOUGHT i was doing was setting up this site with no folders and just coming out of Home/. So, you would have, on your breadcrumb, Home/, then Home/Links, then Home/Tips. And that, btw, is what the breadcrumb says. But the page inspector says differently. So, have I fucked up the General Settings and should I change them, then republish? No folder, just filename? Or just / instead of folder? What may be happening is that I am telling the Link to look for “Links” but it is actually looking for “page2”?

OK – I just looked at my other site, televisionadvertising.com . Going through the General Settings for that site, I see a different browser title for each page, the symbol “/” (without the quotes) for folder, a filename that is actually a filename, such as “dentist.html” or “faq.html”. And that site works fine, although I haven’t tried to use that Anchor stack in it. Think I may have forgotten that part when putting together the austinracewalkers.com site. If so, can I just correct all that and republish?

THEN – try the anchor stack!

P.S. I owe all you guys a beer.

I HAVE NOW COMPLETELY SCREWED UP MY SITE!

For any of you who looked at my site, austinracewalkers.com, earlier today, please look at it again. You will see how everything from the header to the picture margins and padding, to shapes of buttons, to the fact that the “Links” page is not even accessible – everything – is now screwed up. Unless it fixes itself overnight which I do not expect.

Here’s what I did. As you will see, in my last post, in the “NOW, COULD THIS BE THE PROBLEM?” section, I laid out how my settings on the page inspector for the three pages were screwed up. I figured, for example, the reason the anchor could not find the “Links” page was because it was actually called “Page2”. So, I went to my other site, televisionadvertising.com, to see how I had set up those setting there. They were all just / (forward slash) for folder, had browser titles and the correct page names, etc. And that site works perfectly.

So, I went into the racewalkers site on Rapidweaver and changed those settings to what they should be. I put in just / for folders, gave them browser titles, gave the 3 pages their actual names, i.e., home, links and tips. Now, I figured making these kinds of changes, I should delete my old files on GoDaddy and republish the new ones. Well, you see how it turned out. And I have redone that process 3 times and republished many times. Still completely screwed up. The site looks good – the way it always has since I finished it – on RW Preview and on a Safari page when I open one to look at it. It is just on GoDaddy’s server, after having been published, that it is totally screwed up!

I do notice that the televisionadvertising.com does have a folder which used to also be in the racewalkers site called “uni.php”. That is not there now. But otherwise, all the files went up there. And GoDaddy has no idea what a php.ini file is. They think it may be a Rapidweaver thing.

I talked to GoDaddy. They have no clue what has gone wrong. They think I have to find out from RapidWeaver. But I thought I would ask here first. This has just gone from bad to worse. Started with a little anchor problem that made no difference and now my entire website is screwed up!

Interesting that when I go back and republish it keeps sending up more files. As if it left some behind. One of those episodes made a crude version of the Links page show up, but no changes since.

Any ideas how I can fix this?

Go to file and down to republish all files, see if this fixes it