Detecting the homepage

Detecting the homepage, a forum discussion on Jojo CMS. Join us for more discussions on Detecting the homepage on our Suggestions & Feedback forum.

Back to Forum Index : Back to Suggestions & Feedback   RSS
Rick Rick

13 Sep 2010
Posts: 336

I've come across a few places where the homepage is detected by checking for pageid being 1.

Is there a reason that we're not using the pg_link instead? This would make more sense to me, but would it break anything if I change these instances as I come across them?

btw, I'm not intentionally filling up the sidebar, sorry guys.
tom

Developer

tom

13 Sep 2010
Posts: 379

Sounds great. AFAIK, multi-language sites ignore it in any case, and the changes I've been making to the core aim to do so for all sites (essential ignoring the 'multi-language' option), using the settings in lang_country to define home and root, so it would probably make sense to change it to that model.

The homes are available from $mldata['homes'] and on the current branch you can do an additional check for $mldata['default'] to find the 'base' sub-site (ie the one that doesn't add a prefix to the url)
Back to Forum Index : Back to Suggestions & Feedback   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.