Hi Susan, I’m pretty sure I tried that but no harm trying it again just in case...(pause)... Sure enough, it still doesn’t work as I hope.
Friendly Alias Paths = no in the site configuration should do the trick.
Since I only want to do this to the home page I’m not defeating the whole point of having a CMS, just trying to keep the SEO clean (which I’ll gladly explain if someone is interested).Hi Susan,
Ah, sorry, I misunderstood.
You might be able to hack the Wayfinder snippet to deal with the case when the document ID is the same as the site_start ID, setting the URL directly instead of using the makeUrl function for that item.
Line 77 in the Wayfinder.inc.php file would be the place to do it. If the $v[’id’] is the same as $modx->config[’site_start’], instead of calling $modx->makeUrl, set $v[’link’] to whatever you want, either hard-code the URL or use site_url or something.
# Rewrite directives here for SEF (Search Engine Friendly) URLs
RewriteEngine on
RewriteBase /
# .............THESE NEXT TWO LINES ARE ADDED TO THE "REGULAR" FURLS HTACCESS CODE
RewriteCond %{THE_REQUEST} ^.*\/home
RewriteRule ^(.*)home$ http://www.mydomain.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
This solution may completely suck for reasons beyond my limited knowledge, so use this at your own risk! If this idea is horrible, somebody please set me straight. Now I’m off to study the WayFinder code to better understand your suggestions. Thanks Susan!
We use CSS classes .nav and .navcurrent for menu entries and to highlight the current row, I think I do this by calling [[Wayfinder? ... &hereClass=’navcurrent’ &rowClass=’nav’]]. Correct?
On some pages (legal etc) it is required to have no highlighting, these pages have a &rowClass but no &hereClass. Correct?
Some sections have subsections. The subsection navigation menu, if present, appears in the middle column (and hence in a separate div) and it is required that the current subsection and current section be highlighted. We use CSS classes .subnav and .subnavcurrent for these. Do I just call wayfinder a second time but use [[Wayfinder? ... &hereClass=’subnavcurrent’ &rowClass=’subnav’]] and with hereClass set in the main navigation?
This may be off-topic but is there a way to avoid an explosion of templates? If all pages have a common template but the subsections have different parents then I can’t see how to avoid having a new template for each subsection with the appropriate parent hereClass set by hand.
This discussion is closed to further replies. Keep calm and carry on.