Anchor doesn't work after added {metadata <base href="..."/>} to the template

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
icammy

Anchor doesn't work after added {metadata <base href="..."/>} to the template

Post by icammy »

Hi All! I would like to question about the anchor.

At the beginning, I added the metadata tag to {metadata showbase=true} and the anchors work fine.
As I would like to use the relative path and pretty URLs, I added {metadata } to my template.
And now all the anchor links doesn't work.

Could any body help??Thanks in advance!! =]
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the templat

Post by Dr.CSS »

You need to take this out of the tag enclosure and put it in the Global Metadata field in Site Admin>Global Settings...

  NOTE: the space is important after the address and before the />...
icammy

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the template

Post by icammy »

Thanks Mark!
I have tried to add to the Global Settings
and deleted {metadata } in the template.
However, it makes all the images unlinked.
The links change to be "http://192.168.8.12/uploads/images/logo.gif".
But actually the links are supposed to be "http://192.168.8.12/cms/uploads/images/logo.gif".
And the anchor is still misslink. For example, the link is suppose to be
"http://192.168.8.12/cms/faq/basic-concepts/#BC2" and it is now "http://192.168.8.12/#BC2".
TimothyFoo
Forum Members
Forum Members
Posts: 44
Joined: Wed Oct 12, 2005 8:50 pm

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the templat

Post by TimothyFoo »

In your config.php file, does the following entry have "cms" as one of the folder names?

Code: Select all

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/foldername/foldername/foldername_html/foldername';
icammy

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the template

Post by icammy »

Thanks Timothy!
I have the line "$config['root_path'] = '/var/www/html/cms'; " in the config.php.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the templat

Post by Dr.CSS »

You did leave the {metadata} tag in, right?...
icammy

Re: Anchor doesn't work after added {metadata <base href="..."/>} to the template

Post by icammy »

Hi Mark!
In the template, the {metadata} tag is still here.
Should I delete it?
Locked

Return to “CMSMS Core”