? ?
avatar uglyeoin
uglyeoin
30 Sep 2019

RFC: Do not link page heading to article via a JLayout, but instead put it in a module

The page heading is not much of a page heading if it appears in the middle or lower down the page. Sliders and other modules are commonly put above articles, which leads to the page heading markup being in a strange position.

By disconnecting the JLayout and adding the page heading to a module we are able to position the page heading anywhere on the page that our template allows. Would this then make the "show page heading" option in the menu confusing? As it could be controlled at module assignment level or publish/unpublish.

A page heading IS important for SEO and its position is also important for SEO. Articles already have an article title, so it could be argued the page heading relates to the page (menu item) and not always the article. A page with a lot of other modules could be mainly about a different subject.

If people agree with my statement I would be happy to submit a J4 pull request. I'm sure there will be arguments against, hopefully not 250 comments and a 3 year discussion, but please let me/us know your thoughts.

avatar uglyeoin uglyeoin - open - 30 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Sep 2019
avatar mbabker
mbabker - comment - 30 Sep 2019

? at least not without bigger re-thinking of what a "page heading" is, and inherently how that specific parameter interacts with the entire request-response cycle (and this would theoretically get into other system elements too).

Part of the problem is it is rendered as part of the component area, after dealing with parameter merging, which means to figure out what the heading is needs to go through the component as part of the normal request-response cycle. Moving it to a module forces you to put that data into some kind of request specific state so that a module can access the data processed by the component during the primary execution path of a request. You then also have caching to deal with; with it enabled you don't get past Joomla\CMS\MVC\Controller\BaseController::display(), so the model that deals with the parameter merging will never be executed which basically means the module would only use the heading defined in the menu item except for the one request that gets triggered when the cache has expired and needs re-built.

(Note this same type of problem in theory exists with Joomla\CMS\Pathway\Pathway and the breadcrumbs module, which is conveniently worked around in the oh-so-aptly named Joomla\CMS\Cache\Cache::getWorkarounds(), a name which should imply that some kind of architectural issue is being hacked around)

avatar uglyeoin
uglyeoin - comment - 1 Oct 2019

Thank you @mbabker that is very insightful. It all makes a lot of sense. For me it's just about layout, but there is always a code process that I don't understand enough about to foresee. Let's see if anyone else gets involved - but only to see if there is a mass outcry of support for the idea.

I can't see it happening. I'll close this in a week or two if nobody comes. Thanks for taking the time to explain.

Theoretically... this would be possible with getWorkarounds?

avatar Quy Quy - change - 13 Nov 2019
Labels Added: ?
avatar Quy Quy - labeled - 13 Nov 2019
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2019
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 13 Nov 2019
avatar Quy Quy - change - 13 Nov 2019
Title
RFC: Do not link page heading to article via a JLayout, but instead put it in a module
[RFC] Do not link page heading to article via a JLayout, but instead put it in a module
avatar Quy Quy - edited - 13 Nov 2019
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Nov 2019
avatar Quy Quy - change - 17 Nov 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-11-17 02:33:15
Closed_By Quy
avatar Quy Quy - edited - 17 Nov 2019
avatar Quy Quy - close - 17 Nov 2019

Add a Comment

Login with GitHub to post a comment