Page 1 of 1

[solved] Anchor '^ Top' not working

Posted: Mon May 26, 2008 9:09 am
by bfctradingpost
Setup:

CMS Made Simple 1.2.5 "Free Hill"
Operating System: Linux
PHP 4.x
MySQL 4.1

Problem:

Can't get '^ Top' anchor to function properly.

Description:

I've just set up a site and I failed to insert:

Code: Select all

{* start accessibility skip links *}
    <ul class="accessibility">
      <li>{anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}</li>
      <li>{anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}</li>
    </ul>
    {* end accessibility skip links *}
Obviously this goes just under section of the template.

Code: Select all

{* Start relational links *}
	 <div class="hr"></div>
	 <div class="right49">
	 <p>{anchor anchor='main' text='^ Top'}</p>
	 </div>
         <div class="left49">
         <p>{cms_selflink dir="previous" label="Previous page: "} <br />
         {cms_selflink dir="next"}</p>
         </div>
	 {* End relational links *}
and this just under {content}

I've since added the above code within the template, however on the frontend, '^ Top' just takes me to the default page 'Home'. I don't want it to take me to the default page. I'd like it to take me to the top of the page. The 'Next' and 'Previous' links work perfectly.

I've been through the forum in search of similar problems like mine, and have tried several ways to solve this problem including:

Code: Select all

{metadata showbase="false"}
Which also doesn't seem to work.

Any suggestions and/or have I missed anything out?

Cheers Patrick

Re: Anchor '^ Top' not working

Posted: Mon May 26, 2008 4:56 pm
by Dr.CSS
Do you have a div id="main" up near the top?...

Re: Anchor '^ Top' not working

Posted: Mon May 26, 2008 5:57 pm
by Mesmer
I had the same problem. Check this topic: http://forum.cmsmadesimple.org/index.ph ... 471.0.html

Problem was solved when I switched to pretty urls

Re: Anchor '^ Top' not working

Posted: Tue May 27, 2008 11:24 am
by bfctradingpost
Hi mark,
mark wrote: Do you have a div id="main" up near the top?...
No I don't, but I do have this:

Code: Select all

<div id="maincontent">
Cheers,

Patrick

Re: Anchor '^ Top' not working

Posted: Tue May 27, 2008 5:39 pm
by Dr.CSS
When you use the anchor tag you have to point it to a div on the page, other wise it will go to the home page...

Re: Anchor '^ Top' not working

Posted: Tue May 27, 2008 6:08 pm
by Pierre M.
Hello Patrick
bfctradingpost wrote: PHP 4.x
beware x>=3.3 is more confortable
http://wiki.cmsmadesimple.org/index.php ... quirements
Mesmer has said it may be linkd to pretty URLs, hence 4.3.3+

Pierre M.