Page 1 of 1

Pretty URLs and excludeprefix page aliases

Posted: Tue Apr 13, 2010 9:12 pm
by mran
I've been writing a site with a dual menu system, which uses the 'excludeprefix' tag {menu excludeprefix='left'} to sort the pages into their appropriate menus.  This is totally fine until I enable pretty URLs, and then I get something like this:

http://mysite.com/top-plan-visit/top-school.html

This is not really terrible, but I'd love if someone can point me to a rewrite rule which can strip out those prefixes.  I'd like to remove "top-" and "left-"

Right now, my rewrite rules look like this:

Code: Select all

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
I know this is different from what is given in the example .htaccess.txt and in the doc, but this is the only configuration that seems to work on my host.

Thanks if anyone has a suggestion.

Re: Pretty URLs and excludeprefix page aliases

Posted: Wed Apr 21, 2010 5:36 pm
by Rolf
Hi mran,

Have you tried to use two different menu trees in the admin, in stead using the prefix?

1 top-nav
  1.1 page 1
  1.2 page 2
  1.3 page 3

2 left-nav
  2.1 page a
  2.2 page b
  2.3 page c

And in your template something like:
Top menu
  {menu start_element='1.1' show_root_siblings="1"}
Left menu
  {menu start_element='2.1' show_root_siblings="1"}

Grtz. Rolf