kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 131 forks source link

Fix @is_current to work on index page. #20

Closed jackjennings closed 11 years ago

jackjennings commented 13 years ago

@is_current currently doesn't work when the index page is included in the $root loop to produce site navigation.

I've replaced the simple check for the permalink to == 'index' with a preg_replace with matches either '?/index/' (without htaccees), or just 'index/' (with htaccess).

Cheers, Jack

thor commented 13 years ago

Ooo, this one - I haven't updated my stacey since 2.2.2, but I came across this and fixed it in an incredibly dirty and filthy way that didn't involve any proper coding at all.

In fact, I'm not quite sure why I even say this. Either way, I think I ended up using .htaccess to redirect any /index/ back to /, as /index/ shouldn't be used over / in any cases - from my point of view.