Page 1 of 1
[solved] Anchor tags sending me to site home page
Posted: Mon Mar 21, 2011 9:51 pm
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

(
Re: Anchor tags sending me to site home page (solved)
Posted: Tue Mar 22, 2011 2:39 am
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
~Wayne
Re: Anchor tags sending me to site home page (solved)
Posted: Wed Apr 06, 2011 11:02 am
by gocreative
FYI - while this works, it causes all Gallery images to 'break'.
Re: Anchor tags sending me to site home page (solved)
Posted: Sun Oct 23, 2011 3:11 pm
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
Re: Anchor tags sending me to site home page (solved)
Posted: Mon Oct 24, 2011 11:38 am
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
Re: Anchor tags sending me to site home page (solved)
Posted: Tue Oct 25, 2011 7:34 am
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
Re: Anchor tags sending me to site home page (solved)
Posted: Tue Oct 25, 2011 7:45 am
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.
Re: Anchor tags sending me to site home page (solved)
Posted: Tue Oct 25, 2011 10:56 am
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
Re: Anchor tags sending me to site home page (solved)
Posted: Tue Oct 25, 2011 9:50 pm
by gocreative
Yeah, but still not particularly friendly for the novice end user.