Menu System: Homepage vs. Default Menu Item

181 views
Skip to first unread message

Hannes Papenberg

unread,
Aug 2, 2016, 6:56:42 AM8/2/16
to Joomla! CMS Development
Hi folks,
we had this come up numerous times in the past, but so far we haven't
really solved this in a satisfactory way. I want to express right at the
start that I don't know the right solution and what I'm proposing is
neither tested nor has it any bigger theoretical backing.

Joomla currently has one flag for the Home menu item, which defines the
menu item to use when you simply call the root of Joomla (mostly the
domain). If the routing code can not find a matching menu item for a
given link, it falls back on that Home menu item. This makes it
difficult for developers since sometimes the homepage of a site has a
reduced set of modules or even a different template altogether.

The question is, if we should change this behavior and define both a
home and default menu item. The home menu item would be responsible for
the homepage, while the default menu item would be the fall back for all
non-existing menu items. We could define that by using the current
"home" column in the menu table and allowing that to be set to 0, 1 or
2, where 2 would be for the default menu item. You could set that for
each language seperately and if no default menu item is defined, it can
still fall back on the home menu item.

The problems then however are, how that should really behave. If you
open the domain of the site and get the home menu item, how should the
following links be treated? Does the home menu item really only show up
for the root of the site or is it also used for subsequent pages that
would be normally linked to via the home menu item? Consider the home
menu item to be of type com_content - category view. Articles could then
be linked directly to that home menu item, like /42-test. Should those
pages get the default menu item instead of the home menu item? Or should
the default menu item only apply for URLs of the form
/component/com_<component>/...? Then is the question what to do with the
menu item alias. Should such a URL contain the alias of the default menu
item?

There are some advances, but also a few downsides and lots of stuff that
needs to be decided before implementation...

What do you think?

Hannes

brian teeman

unread,
Aug 2, 2016, 9:05:33 AM8/2/16
to Joomla! CMS Development
Personally I would not be in favour of this change. The downsides are too great and will change pretty much all existing web sites.

For my workflow if I want to do modules on all pages except the homepage I use the module setting 'all except'

Sergio Manzi

unread,
Aug 2, 2016, 9:08:45 AM8/2/16
to joomla-...@googlegroups.com

The problem are not the modules you want on all pages except home, but the ones you want only on the home and that instead are popping out at unexpected places.

Michael Babker

unread,
Aug 2, 2016, 9:12:07 AM8/2/16
to joomla-...@googlegroups.com
Joomla doesn't have the notion of a homepage right now, right or wrong.  So I think calling the menu item the "home" menu item is wrong and the UI verbiage should be updated to align with what it's called in the code, "default" with a clear understanding that at any time there is something routed without a menu item assigned to it that this is the menu item whose configuration gets used.

What Hannes suggest kind of makes sense from the notion of "I only want the homepage to display this stuff and no other page ever" but Joomla's menu system just doesn't make this distinction right now and if it's going to be too disruptive to introduce the distinction then it needs to wait for 4.0.

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.

Sergio Manzi

unread,
Aug 2, 2016, 9:22:55 AM8/2/16
to joomla-...@googlegroups.com

... or, as Hannes suggests, find out a B/C way:

  • repourpose the current "default page" concept as meaning "home page"
  • introduce a new "default page" concept
  • in absence of a "default page" the "home page" act as "default page" too (and hence full b/c)

Michael Babker

unread,
Aug 2, 2016, 9:39:30 AM8/2/16
to joomla-...@googlegroups.com
Except it's not B/C if you repurpose an existing API/structure, no matter how many proxies you put in front of it.  So you have to introduce new API, but it can't be JMenu::(get|set)Default() because that's already mapped to what the UI calls the home page.  So you could add JMenu::(get|set)Home(), but what do you call it in the UI because we're already calling the default item the home page?  So say we go forward with that proposal and now you have two columns in the menu table, "home" and "default", but in reality "home" indicates the default menu item and "default" indicates the home menu item, confused yet?

Yes, it's easy to add the code, but from a workflow perspective, none of it makes any sense whatsoever right now.  It's all mapped in a way that's seriously bass ackwards and trying to add on top of that just makes it more confusing.

It really isn't a big deal having modules display on pages other than what you consider the "true" home page.  Because in a properly built website, nothing's going to FUBAR the routing to a point where you get that scenario.  Sure, one can manipulate Joomla's routing all day long with GET variables and create interesting pages, but that's honestly a side effect of a system with too many overrides at too many levels.

Sergio Manzi

unread,
Aug 2, 2016, 9:57:00 AM8/2/16
to joomla-...@googlegroups.com



On 2016-08-02 15:39, Michael Babker wrote:
Except it's not B/C if you repurpose an existing API/structure, no matter how many proxies you put in front of it.  So you have to introduce new API, but it can't be JMenu::(get|set)Default() because that's already mapped to what the UI calls the home page.  So you could add JMenu::(get|set)Home(), but what do you call it in the UI because we're already calling the default item the home page?  So say we go forward with that proposal and now you have two columns in the menu table, "home" and "default", but in reality "home" indicates the default menu item and "default" indicates the home menu item, confused yet?

Yes and no (I think): Yes, all the "Default" relating API/structures will indeed refer to what we are now calling "Home" page (but semantically one could argue that the Home Page is the domain default page, so it isn't so bad call it Default Page),  then let's call the "new thing" with a different name: "catchall", "orphan", "fubar", or something like that (leaving the job to native English speakers)


Yes, it's easy to add the code, but from a workflow perspective, none of it makes any sense whatsoever right now.  It's all mapped in a way that's seriously bass ackwards and trying to add on top of that just makes it more confusing.

It really isn't a big deal having modules display on pages other than what you consider the "true" home page.  Because in a properly built website, nothing's going to FUBAR the routing to a point where you get that scenario.  Sure, one can manipulate Joomla's routing all day long with GET variables and create interesting pages, but that's honestly a side effect of a system with too many overrides at too many levels.


The typical example I often see are "Search result" pages, that unexpectedly inherit the home (default) page modules. Easy to fix with the usual "hidden menu", but that's far from intuitive for new Joomla users.


One more consideration: if the main (only ?) issue are modules popping out unexpectedly, then there is a solution in the "Regular Labs Advanced Modules Manager" extension. Without stealing all the goodies that there are in there, we could probably have a look and see if that particular aspect (modules rendered only on the true home page) can be incorporated into the core...

brian teeman

unread,
Aug 2, 2016, 9:57:51 AM8/2/16
to Joomla! CMS Development
+ 100

Michael Babker

unread,
Aug 2, 2016, 10:11:23 AM8/2/16
to joomla-...@googlegroups.com
I still think we're looking for a problem to solve here and I think solving it just makes a more confusing API/UI but *shrug*

You can already make this distinction and change stuff via plugins if you need to.  That to me makes this less urgent to rush a fix into core.

Like I said, I think we screwed up calling it the home menu item in the UI when the underlying system does not treat it as a menu item for only the home page.  But fixing it at this point just creates more confusion than it's worth before you can make a B/C break (and I'd rather do it right versus slap more crap code on top of an already duct taped together system).  To me default is default, not "only when the '/' route is requested", so trying to add it with another term just feels awkward and more confusing to me.


--
- Michael

Please pardon any errors, this message was sent from my iPhone.

Sergio Manzi

unread,
Aug 2, 2016, 10:30:35 AM8/2/16
to joomla-...@googlegroups.com

Urgent? no (at least as far as regard myself)
Advisable? Probably yes, to make life easier to new users adopting Joomla

As you correctly pointed out the mismatch between the API and UI terminology is an "original sin" of which we are now paying the consequences, but there is nothing we can do about that, I guess :  API (developers)=default, UI (users)=home

Waiting for 4.0 (or whatever)? I don't think it will make a difference: my personal opinion (and prophecy) is that 4.0 will maintain a b/c API (and thus we will still have that terminology mismatch as we have today). Changing the API to the point to fix the above will mean that almost all third party extensions will have to be rewritten, that will hardly happen, and Joomla would be dead.

Michael Babker

unread,
Aug 2, 2016, 10:57:02 AM8/2/16
to joomla-...@googlegroups.com
But if done correctly it also simplifies code going forward.  And 4.0 won't be 100% B/C so breaking changes that make complete sense and only improve the API shouldn't be ignored lightly for the sake of not breaking code.

This is one of those times where a breaking change works in our benefit.  Unlike when the database API's "nameQuote" method was renamed to "quoteName".

Sergio Manzi

unread,
Aug 2, 2016, 11:04:55 AM8/2/16
to joomla-...@googlegroups.com

From a "coder" point of view, absolutely.

From a "marketing" point of view, hardly...

(But I'm grossly going OT)

Michael Babker

unread,
Aug 2, 2016, 11:10:13 AM8/2/16
to joomla-...@googlegroups.com
From a marketing point of view you tell anyone you made a breaking change and there's rage.  No matter how you do it.  So by that perspective there should never ever ever be a breaking change again (so undeprecate all the deprecated things).

Which is why you have to make logical breaking changes.  Not everyone's gonna like it but with a clear explanation it's at least easier to justify.

Leo Lammerink

unread,
Aug 2, 2016, 11:21:03 AM8/2/16
to joomla-...@googlegroups.com

That is +100 for me

Webdongle Elgnodbew

unread,
Aug 2, 2016, 4:52:49 PM8/2/16
to Joomla! CMS Development
imho the default menu item is not the Home page it is the landing page.  If the site admin wants a page (other than the landing page) to be the Home page then they should change the default menu item.
  1. Leave the Default menu 'Home' (with alias 'home')
  2. Change the tooltips 'Default' and 'Set Default' to' Landing page' and 'Set Landing page'
  3. Have the 404 page as the fall-back
    (better still Have an Article 404 and have the fall-back to that Article ... displayed in the component.php)

brian teeman

unread,
Aug 2, 2016, 5:42:58 PM8/2/16
to Joomla! CMS Development


On Tuesday, 2 August 2016 21:52:49 UTC+1, Webdongle Elgnodbew wrote:
imho the default menu item is not the Home page it is the landing page. 

What is the landing page if not the home page?

Webdongle Elgnodbew

unread,
Aug 2, 2016, 6:21:38 PM8/2/16
to Joomla! CMS Development
What is the landing page if not the home page?

The 'Landing Page' is the default page for www.site.com.  Sometimes the site admin wants a 'splash page' as the 'landing page' but don't want the visitor to return to the 'splash page' when the menu item called 'Home' is clicked.  In that scenario the 'Splash Page' is Landing page and the site Home Page is separate to it.

 

Robert G Mears

unread,
Aug 3, 2016, 1:38:43 PM8/3/16
to Joomla! CMS Development


What is the landing page if not the home page?

The 'Landing Page' is the default page for www.site.com.  Sometimes the site admin wants a 'splash page' as the 'landing page' but don't want the visitor to return to the 'splash page' when the menu item called 'Home' is clicked.  In that scenario the 'Splash Page' is Landing page and the site Home Page is separate to it.
 
What, then, are the respective URLs?

www.site.com for the landing page

and

www.site.com/home or www.site.com/home.html for the HOME page?

Leo Lammerink

unread,
Aug 3, 2016, 2:21:55 PM8/3/16
to Joomla! CMS Development
Just some thoughts here and I do not know the routing indebt to understand the consequences but if you're using Apache on your server and you have access, the Apache-default .htaccess setup shows:

DirectoryIndex index.html index.shtml index.php index.htm default.html Default.htm default.html Default.html default.shtml Default.shtml page1.html index.pl index.cgi index.php3 index.phtml home.htm home.html home.shtml index.wml
If you are on a VPS or Dedi you can edit this (ordering) to your needs however no options for shared hosting users are available for ordering this. This is the reason for example that you can easy take your site offline in the most basic form with an index.html in the root which precedes over the Joomla index.php. So in your scenario site.com would be with a default Apache settings "site.com/index.html"

I am not sure how Joomla arranges for this but it looks for 'index.php" as per htaccess settings in core Apache I think and so 'home.html' as Robert gives in his question (if I understand your question correct) is never going to be the 'home-page' but could be as Brian mentioned earlier correct the 'landing page'

I am actually quite confused here?

Leo

Robert G Mears

unread,
Aug 3, 2016, 3:49:23 PM8/3/16
to Joomla! CMS Development

I am not sure how Joomla arranges for this but it looks for 'index.php" as per htaccess settings in core Apache I think and so 'home.html' as Robert gives in his question (if I understand your question correct) is never going to be the 'home-page' but could be as Brian mentioned earlier correct the 'landing page'

@Leo

The URLs I mentioned derive from using "Search Engine Friendly URLs" and "" in Global Configuration. They are what display in the browser, not necessarily in the code that creates the page.

Webdongle Elgnodbew

unread,
Aug 3, 2016, 7:53:37 PM8/3/16
to Joomla! CMS Development
Hi Robert


What, then, are the respective URLs?

www.site.com for the landing page

and

www.site.com/home or www.site.com/home.html for the HOME page?


Yes ... if the site admin wanted a splash page and (once the visitor had entered the site after clicking a link on the splash screen or the click intro button) wanted the 'Home' menu item to point to a different page.  The site admin just needs to select a menu item (that links to the splash page)  as 'default' and the page of that menu item becomes the landing page.

Otherwise if the site admin does NOT want a landing page then the default menu item is left as is and page of the 'Home' menu item is the landing page

The page linked to by the default menu item is the 'Landing page' (i.e. the page displayed with www.site.com) and it can be any menu item not just the 'Home page' menu item.  That's why having the 'fall back' to the default menu item can cause problems for some sites.  Hence my suggestion

  1. Leave the Default menu 'Home' (with alias 'home')
  2. Change the tooltips 'Default' and 'Set Default' to' Landing page' and 'Set Landing page'
  3. Have the 404 page as the fall-back
    (better still Have an Article 404 and have the fall-back to that Article ... displayed in the component.php)

Robert G Mears

unread,
Aug 4, 2016, 8:29:16 AM8/4/16
to Joomla! CMS Development
Hi Kevin,

This seems to be splitting hairs.
The HOME page title can be whatever one wants: CONTENTS, FRONT PAGE, HOME, etc.
The alias "home" can be changed to "landing-page" or "splash-page".
And, if one does not want it to be accessible in the menu it can be set to "display:none" in the CSS.
Then the site's main or overview page can be titled as "HOME" in the main menu; even given the alias "home" in the admin section.

That is, in fact, what I've done on this site: GW DESIGN. Although I use the label: front page (instead of home).

Hannes Papenberg

unread,
Aug 4, 2016, 8:38:13 AM8/4/16
to joomla-...@googlegroups.com
I would guess that the change that I propose could be implemented in a
backwards compatible way, at least in a backwards-enough compatible way
that no one breaks their site by accident. But looking at the discussion
here, I've come to the conclusion that (at least I) should not push this
further.

Regards,
Hannes

Am 02.08.2016 um 17:10 schrieb Michael Babker:
> From a marketing point of view you tell anyone you made a breaking
> change and there's rage. No matter how you do it. So by that
> perspective there should never ever ever be a breaking change again (so
> undeprecate all the deprecated things).
>
> Which is why you have to make logical breaking changes. Not everyone's
> gonna like it but with a clear explanation it's at least easier to justify.
>
> On Tue, Aug 2, 2016 at 10:04 AM, Sergio Manzi <s...@smz.it
> <mailto:s...@smz.it>> wrote:
>
> From a "coder" point of view, absolutely.
>
> From a "marketing" point of view, hardly...
>
> (/But I'm grossly going OT/)
>
>
> On 2016-08-02 16:56, Michael Babker wrote:
>> This is one of those times where a breaking change works in our
>> benefit.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! CMS Development" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to joomla-dev-cm...@googlegroups.com
> <mailto:joomla-dev-cm...@googlegroups.com>.
> To post to this group, send email to joomla-...@googlegroups.com
> <mailto:joomla-...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/joomla-dev-cms.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! CMS Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to joomla-dev-cm...@googlegroups.com
> <mailto:joomla-dev-cm...@googlegroups.com>.
> To post to this group, send email to joomla-...@googlegroups.com
> <mailto:joomla-...@googlegroups.com>.

Webdongle Elgnodbew

unread,
Aug 4, 2016, 1:47:14 PM8/4/16
to Joomla! CMS Development
Hi Robert

No it is not splitting hairs.  imho the difference between the default landing page and the 'Home' menu item is important to acknowledge when the question is asked


The question is, if we should change this behavior and define both a
home and default menu item. The home menu item would be responsible for
the homepage, while the default menu item would be the fall back for all
non-existing menu items.





Robert G Mears

unread,
Aug 4, 2016, 3:01:10 PM8/4/16
to Joomla! CMS Development
Hi Kevin,

The way you phrase the question it makes more sense now.


The home menu item would be responsible for
the homepage, while the default menu item would be the fall back for all
non-existing menu items.
 
However, your use of the term "landing page" is confusing because it has specific marketing connotations.

brian teeman

unread,
Aug 4, 2016, 3:22:44 PM8/4/16
to Joomla! CMS Development
Home is just a label

Default has specific meaning on a web server

Webdongle Elgnodbew

unread,
Aug 4, 2016, 5:14:27 PM8/4/16
to Joomla! CMS Development
Hi Rob


The way you phrase the question it makes more sense now.

I didn't phrase the question.  That was an exact quote from Hannes's original post.  And my reply to it was
  1. Leave the Default menu 'Home' (with alias 'home')
  2. Change the tooltips 'Default' and 'Set Default' to' Landing page' and 'Set Landing page'
  3. Have the 404 page as the fall-back
    (better still Have an Article 404 and have the fall-back to that Article ... displayed in the component.php)
In other words instead of changing the 'fall back' from the default menu item (landing page) to the 'Home' menu item ... have the 'fall back' as a 404 page.





 

Robert G Mears

unread,
Aug 4, 2016, 5:53:56 PM8/4/16
to Joomla! CMS Development
Hi Kev,

Thanks, then, for restating the question.

Calling the home or the default page "landing page" is inappropriate. The term is used in marketing campaigns. Landing pages are generally designed to get the user to take some kind of action, such as give the website his/her email address. Or make a donation ...

And, as Brian said, Default is server terminology.

csthomas

unread,
Aug 4, 2016, 6:37:27 PM8/4/16
to Joomla! CMS Development

Home is just a label

Default has specific meaning on a web server


Hi,

Now Joomla has a lots of pages: Home page, Landing page, Splash Page, Default Page.

IMHO for me:
1) Home is just another regular label as Login, etc
2) Joomla could rename  column (in html) on menu item list from "Home"  to "Landing Page" - name more correct
3) Landing page == Splash Page, for more advanced splash we can use cookies, htaccess or plugins to redirect to /my-spash-page only first time

4) Joomla should not always force a default menu item, we could have pages without menu items

5) I would want to have a default page per each component as fallback (we could add a parameter to enable that behaviour per component for B/C).
If joomla does not have menu item for my page then should fallback to default for component, example for com_tags /tags.

Default page for com_x could be index.php?option=com_x&view=[default_view]&layout=[default_layout]...

If I want to find out a default/fallback menu item for com_x then joomla should check above, if exist then use it, if not leave without menu item.


It is hard for B/C, but joomla could use landing page as the last fallback.
It could be set up in plugin like url_landing_page_as_fallback_for_back_compatibility and enabled on first plugin installation.


Reply all
Reply to author
Forward
0 new messages