anchor tag help

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.
Post Reply
User avatar
tonypb
Forum Members
Forum Members
Posts: 104
Joined: Tue Nov 20, 2007 12:16 am

anchor tag help

Post by tonypb »

I am first adding the anchor tag where i need them then i select the text where i want to add the link and select from the anchor tag list that is not provided.. but when i preview the page, the anchor tags take me to the home page instead of jumping within the page where they are located...

any ideas?
patino-burch design
Anthony Patino-Burch
nivekiam

Re: anchor tag help

Post by nivekiam »

Same thing is happening to me.  Watching the status bar, you'll see why that's happening.  I don't know if

File a bug report.  If you save or apply the change and view the page live, you'll see that it works as intended.

Also, if you edit plugins/function.metadata.php and change $showbase to false:
$showbase = true; to $showbase = false;

Then it appears to work in the preview.  Again, I don't know why the base tag is used or set anywhere in the code.  This is just one more example of where it causes more problems than it helps out with.  It's one of the most pointless tags ever created.  Code your pages so it doesn't need that.
User avatar
tonypb
Forum Members
Forum Members
Posts: 104
Joined: Tue Nov 20, 2007 12:16 am

Re: anchor tag help

Post by tonypb »

thanks... appears to be working fine now...
patino-burch design
Anthony Patino-Burch
nivekiam

Re: anchor tag help

Post by nivekiam »

I forgot I made this post.  I learned from calguy1000, that you can set this in the template.

Edit your template and change: {metadata} to {metadata showbase='false'}

Then you don't need to hack any of the files that will inevitably be replaced on your next upgrade.
User avatar
tonypb
Forum Members
Forum Members
Posts: 104
Joined: Tue Nov 20, 2007 12:16 am

Re: anchor tag help

Post by tonypb »

cool thanks...

this is my first attempt ever at using CMS... im NOT a programmer at all... im a designer so this is all so foreign to me but.. so far so good... specially with all the help i've been getting here in the forum

so THANK YOU ALL!!

http://www.aerainc.org/index.php (home button points to the CURRENT site and not to the CMS home page) - hate having to use so huge fonts but... its for retired teachers so... simple and clean and HUGE fonts is what they wanted
patino-burch design
Anthony Patino-Burch
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: anchor tag help

Post by Dr.CSS »

If you use the anchor tag with {metadata} it works, if you use it correctly...

Example:  {anchor anchor='navbox' text="^Top"}  you have to have a div in the template with the name you use, mine is for the navigation div, from my home page...

The href base is for a reference to where your coming from so you don't have to put full paths in the CSS or image calls in pages just uploads/images/image.jpg etc., if you move a site it will be able to find the images and such, I just moved a few sites and imported the DBs and used the DB for a site with a diff. name and it found all the images just fine...
nivekiam

Re: anchor tag help

Post by nivekiam »

It looks like when you're using the WYSIWYG feature to place an anchor it's not using smarty markup to place the anchor.  At least as far as I can tell.
User avatar
tonypb
Forum Members
Forum Members
Posts: 104
Joined: Tue Nov 20, 2007 12:16 am

Re: anchor tag help

Post by tonypb »

i started adding smarty code to do it and still wasnt working... i decided to add my own anchor tags this way thinking of when the client takes over it will easier for them to add this than to place smarty template code
patino-burch design
Anthony Patino-Burch
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: anchor tag help

Post by Dr.CSS »

You don't have the {metadata} tag in the it looks like to me and you get an error form the ,, line 192 column 157 - Warning: anchor "top" already defined ...

The other reason I started using the href base was when I edited a pages CSS using Firefox Web Dev. toolbar the images would all disappear so I couldn't make my adjustments...
Post Reply

Return to “CMSMS Core”