Page 1 of 1
anchor tag help
Posted: Thu Jan 17, 2008 5:23 am
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?
Re: anchor tag help
Posted: Thu Jan 17, 2008 5:43 am
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.
Re: anchor tag help
Posted: Fri Jan 18, 2008 2:03 am
by tonypb
thanks... appears to be working fine now...
Re: anchor tag help
Posted: Fri Jan 18, 2008 2:06 am
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.
Re: anchor tag help
Posted: Fri Jan 18, 2008 2:12 am
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
Re: anchor tag help
Posted: Fri Jan 18, 2008 3:52 am
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...
Re: anchor tag help
Posted: Fri Jan 18, 2008 3:59 am
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.
Re: anchor tag help
Posted: Fri Jan 18, 2008 4:24 am
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
Re: anchor tag help
Posted: Fri Jan 18, 2008 4:51 am
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...