[solved] Anchor tags sending me to site home page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
User avatar
Biggles_downunder
New Member
New Member
Posts: 9
Joined: Wed Jun 04, 2008 2:54 am

[solved] Anchor tags sending me to site home page

Post by Biggles_downunder »

I have returned to using CMSMS after a long absence (a long story for another day) and I have begun using version 1.9.4 of CMS Made Simple and version 2.8.4 of TinyMCE.

I set up a page with anchors and links to those anchors further down the page. After setting these up they don't work. No matter which anchor tag I click on, I go to the home page of the site.

Searching the forums shows that this was a problem with earlier versions of CMSMS and TinyMCE, but I would have thought something as basic as this would have been fixed by now - or am I missing something fundamental.

I did try reading the proffered solutions for the earlier versions, but they seemed pretty complex to implement for a mere mortal like me.

Is someone able to give me a blow-by-blow solution?

I don't recall having this problem with the earlier versions (I think it was about version 1.6 something).

Looking forward to a solution.

Thanks, Wayne

Edited to fix spelling :o(
Last edited by Biggles_downunder on Tue Mar 22, 2011 2:40 am, edited 1 time in total.
User avatar
Biggles_downunder
New Member
New Member
Posts: 9
Joined: Wed Jun 04, 2008 2:54 am

Re: Anchor tags sending me to site home page (solved)

Post by Biggles_downunder »

Hm, should have known: Google is my friend.

I found the solution after a bit of hunting in my lunch-hour. See here:
http://www.tosd.com.au/2008/12/insertin ... de-simple/

The solution is actually in the 4th reply to the post.

Ridiculously easy actually! Simply replace the {metadata} tag in your template with {metadata showbase="false"}

Sorry for wasting everyone's time :D

~Wayne
gocreative
Power Poster
Power Poster
Posts: 265
Joined: Mon Mar 14, 2011 1:16 am

Re: Anchor tags sending me to site home page (solved)

Post by gocreative »

FYI - while this works, it causes all Gallery images to 'break'.
GroeneKaktus
Forum Members
Forum Members
Posts: 46
Joined: Sat Mar 06, 2010 10:38 am

Re: Anchor tags sending me to site home page (solved)

Post by GroeneKaktus »

Dear all,

I'm having the same problem with the anchors, but the solution posted above doesn't work for me. Any other options maybe?

Using CMSms 1.10

Grtz Jeroen
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: Anchor tags sending me to site home page (solved)

Post by spcherub »

When you have the links to the anchors, try adding the page_alias variable as a prefix, something like this:

Code: Select all

<a href="{$page_alias}#anchor1">Link to Anchor 1</a>
-S
GroeneKaktus
Forum Members
Forum Members
Posts: 46
Joined: Sat Mar 06, 2010 10:38 am

Re: Anchor tags sending me to site home page (solved)

Post by GroeneKaktus »

spcherub wrote:When you have the links to the anchors, try adding the page_alias variable as a prefix, something like this:

Code: Select all

<a href="{$page_alias}#anchor1">Link to Anchor 1</a>
-S
thanks S, for your reply

indeed, this is an option which I already found effective a few days ago,
though it should be possible for my non-technical editor of the website to just insert an anchor and not having to dig into the source code.

Regards, Jeroen
gocreative
Power Poster
Power Poster
Posts: 265
Joined: Mon Mar 14, 2011 1:16 am

Re: Anchor tags sending me to site home page (solved)

Post by gocreative »

GroeneKaktus wrote:it should be possible for my non-technical editor of the website to just insert an anchor and not having to dig into the source code.
I agree completely. Surely there is a better way to achieve this without the need to edit HTML code/use Smarty tags.
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: Anchor tags sending me to site home page (solved)

Post by spcherub »

I should have pointed out that there is a simpler way to insert anchor tags and that is to use the {anchor} extension tag. Yes it still looks like and is a smarty tag but does not require the author to leave the WYSIWYG mode. Look at Extensions > Tags > Anchor for usage information.

Hope that helps.

S
gocreative
Power Poster
Power Poster
Posts: 265
Joined: Mon Mar 14, 2011 1:16 am

Re: Anchor tags sending me to site home page (solved)

Post by gocreative »

Yeah, but still not particularly friendly for the novice end user.
Locked

Return to “CMSMS Core”