Page 1 of 1

[SOLVED] Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 5:34 pm
by krazymike
I'm using the BizBuzz menu manager. I just activated Pretty URLs, and now my menu always shows "Home" as the active page.

My pages now use the .html extension ie, "site.com/news.html"

Here's the Menu Manager code as it is now.

Code: Select all

{if $count > 0}
<ul id="menu" class="sf-menu">
{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->parent == true or ($node->current == true and $node->haschildren == true)}
<li><a class="current" {elseif $node->current == true}
<li><a class="current" {elseif $node->haschildren == true}
<li><a {elseif $node->type == 'sectionheader'}
<li>{$node->menutext} {elseif $node->type == 'separator'}
<li> <br />{else}
<li><a {/if} {if $node->type != 'sectionheader' and $node->type != 'separator'}href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{else}title="{$node->menutext}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}><dfn>{$node->hierarchy}: </dfn><span>{$node->menutext}</span></a>{/if}{/foreach}{repeat string="</li></ul>" times=$node->depth-1}</li></ul>
{/if}

Re: Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 5:51 pm
by Dr.CSS
A link to the page may help, what's with the <br /> in there, it may be stopping the menu from going any farther...

Re: Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 6:01 pm
by krazymike
I have no idea why the <br /> I didn't put that in, but nothing has changed other than the Pretty URLs setting.

This is what I added to my config.php:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';
http://dallascountybiz.com

GREAT! now the menu isn't even working!

Re: Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 6:05 pm
by Dr.CSS
Works for me...

Re: Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 6:08 pm
by krazymike
Are you being sarcastic? The menu doesn't work now!

Re: Menu issues after Pretty URLs

Posted: Sat Feb 26, 2011 8:24 pm
by krazymike
Ok, I got it fixed. It was in the .htaccess file.

Re: [SOLVED] Menu issues after Pretty URLs

Posted: Sun Feb 27, 2011 8:36 am
by Dr.CSS
No I wasn't being sarcastic, it worked then and it works the same now...