SOLVED : How to stop a '-' getting put into page names

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
Eskymo

SOLVED : How to stop a '-' getting put into page names

Post by Eskymo »

Hi there

I have the term 'Case Studies' in my navigation and it's causing me grief. I created my page template for the Case Study page and associated styleheets, attached these and then went to create the actual page. No matter what I do, the page becomes 'case-studies' and therefore naffs up my navigation and my link won't work. How do I get rid of the '-' that is somehow generated. Maybe if someone could explain to me the what the Title and Menu Text input boxes refer to that might help my understanding...but I have tried both of the following with no success:

When creating the page I have used the following:

Title : Case Studies
Menu Text : Case Studies

I get 'case-studies' as the page ID in my nav and also the page link (http://www.techsinthecity.co.uk/devsite/index.php?page=case-studies) and so the link won't work and you can only access the page if you type inthe URL. So I tried

Title : casestudies
Menu Text : casestudies

And the same problem occurs.

My menu code is as follows in case that has something to do with it...

Code: Select all

{if $count > 0}
<ul id="primarynav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}

{if $node->current == true}
<li id="{$node->alias}"><a href="{$node->url}" class="active" title="{$node->menutext}"> <span>{$node->menutext}</span> </a>

{else}
<li id="{$node->alias}"><a href="{$node->url}" title="{$node->menutext}"> <span>{$node->menutext}</span></a>

{/if}

{/foreach}

{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Am I missing something really obvious?

Please help.

thanks

E
Last edited by Eskymo on Tue Oct 30, 2007 2:15 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How to stop a '-' getting put into page names

Post by RonnyK »

E,

if a new page is created, the alias will be set automatically, making some changes to the names, all is lower-case and spaces are replaced by "-".

After editing the name/menuname for a page, the pagealias isnt changed automatically, that has to be done by hand on the options-tab of a page. So only new pages get an alias, all changed pages keep the existing alias which can be edited offcourse. You could make the content-page and menu called "Case Studies" and then manually give it an alias called "casestudies".

Ronny
Eskymo

Re: How to stop a '-' getting put into page names

Post by Eskymo »

You're a genius! Thanks!

I didn't even know the options tab existed until you pointed it out - never noticed that! Will add that to my 'list of things to remember' for the next time I create a site with CMSMS.

Right onto the next learning curve - subnavs...

thanks

E
Locked

Return to “CMSMS Core”