User tests: Successful: Unsuccessful:
Pull Request for Issue #39462 .
Added article layout field to Featured Articles menu item
Article layout field not present
Article layout field present
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Category | ⇒ | Front End com_content |
Status | New | ⇒ | Pending |
Title |
|
Could you please explain more details about the last step in testing instructions:
Check article layout switches
As I understand, this new parameter will control what layout is used to display article when users click on an article from this page to view article details. However, unlike other menu item types, we do not use Featured menu time type for routing (create links to article page), so this parameter won't be passed to article page at all. That could be the reason this parameter is not supported for this menu item type.
However, unlike other menu item types, we do not use Featured menu time type for routing (create links to article page), so this parameter won't be passed to article page at all. That could be the reason this parameter is not supported for this menu item type.
exactly correct
Um. When I checked the Featured Articles menu item type (/item-type-featured-items) it gives the option to link titles, show intro text and add a 'read more' link. On the featured article page on the front end the article (featured-article-1) title is linked and the read more link is displayed in the correct place and you don't see the rest of the text unless you click the title or the read more link.... which takes you to an article page. The URL does not display as a article within its category - e.g. /category/featured-article-1 - but just as /featured-article-1. This article display uses default com_content > article > default.php layout (confirmed by adding a dummy CSS class to the first div in the file), so why can't there be an option to use another layout?
The link to article depends on how you setup menu items on your site. In your sample, if the link to article is /featured-article-1, that means you create a menu item to link directly to that article. In that case, Joomla will uses the layout which you select for that menu item
In short, the link to article has nothing related to the menu item which you created to link to featured articles menu item type, so it could not use the Article Layout setting from that said menu item, and the setting is useless.
The link to article depends on how you setup menu items on your site. In your sample, if the link to article is /featured-article-1, that means you create a menu item to link directly to that article. In that case, Joomla will uses the layout which you select for that menu item
No, you misunderstood me, or more likely I didn't explain myself properly. I set up a menu item of the type "Featured Articles" and called the menu item "item-type-featured-articles". I currently have two featured articles on my test site and they both show up on the "[site]/item-type-featured-articles" page. Each article has a read more link and linked titles. The first article does not appear in a category blog elsewhere which is why, when you click the title, it just displays as [site]/featured-article-1. The second article also appears in a category blog and when clicked goes to that page, i.e. [site]/category-blog/featured-article-2.
Maybe I've completely misread your comment "However, unlike other menu item types, we do not use Featured menu time type for routing (create links to article page), so this parameter won't be passed to article page at all. That could be the reason this parameter is not supported for this menu item type." I read it to mean that clicking an article title does not take it to an article page, which it does, of course. I still don't understand why an alternative layout can't be assigned. Or does this have to be done on an article-by-article basis at article, rather than menu level?
(It also occured to me that assigning modules to a featured article menu item type will only show on the menu item and not on child articles and that, in the case of featured-article-1, the 'prev' and 'next' buttons don't work as expected, either, as they link to category blog pages or, if there aren't any, to a non-SEF link to the next article in the same category, but I guess that's another issue...).
(It also occured to me that assigning modules to a featured article menu item type will only show on the menu item and not on child articles and that, in the case of featured-article-1, the 'prev' and 'next' buttons don't work as expected, either, as they link to category blog pages or, if there aren't any, to a non-SEF link to the next article in the same category, but I guess that's another issue...).
I believe this will be related the point @joomdonation is making. The articles appear to have SEF URLs on your "item-type-featured-articles" page as they are directly linked from the menu item, but due to the way the Featured Articles menu item works the rest of Joomla can not create the same SEF URL.
The way the pages are suppose to be setup is you would have a root menu item (likely a Category Blog), then the Featured Articles is an alternative page that links to the articles within the Category Blog.
I must say that this can be confusing if you only intend to show Featured Articles on your site.
In your example, Article Layout settings belong to Featured Articles menu item settings. That setting will only be carried to article page of the link to article page is something like item-type-featured-articles/featured-article-1 or item-type-featured-articles/category/featured-article-1 (item-type-featured-articles must be active menu item for article detail page)
As you can see, due to how Joomla routing works, link to article page won't have that format, that mean when you access to an article page, the active menu item is not item-type-featured-articles, so the settings which you made for that featured articles menu item won't be used on article details page, thus article layout setting is not used. I don't know how to explain it better, it's a technical thing.
The same for modules which you assigned to item-type-featured-articles menu item. Joomla loads modules base on active menu item, and on article detail page, the item-type-featured-articles menu item is not an active menu item anymore, so modules assigned to that menu are not being loaded
So both your issues have same reasons, and unfortunately, you will have to live with it. I remember there is a PR to merge featured article menu item type into category menu item type and when that happens, the issues/confusing here will be addressed.
@JackKellyUK With the reasons explained above, I would say this PR should be closed .
@JackKellyUK With the reasons explained above, I would say this PR should be closed .
Agreed, I would be interested to see the status of the PR you mentioned
@Scrabble96 I think if you switch your menu item to a Category Blog and in the Blog Layout set Featured Articles to Only it should solve your problem.
I think the Featured Articles description should be amended to reflect that fact that it is only referencing articles with an existing menu item to prevent confusion in the future.
@Scrabble96 I think if you switch your menu item to a Category Blog and in the Blog Layout set Featured Articles to Only it should solve your problem.
Thanks for the suggestion, @JackKellyUK. I did try that originally, but had a problem with the display of a custom module - used as a heading - for each of the menu items. When I clicked on a featured article, it displayed the heading for the main category blog (i.e. the 'wrong' one). I still had problems when I switched to using the Featured Articles menu item type, but I got round it in the end by modifying some custom overrides, CSS and adding some JavaScript. Full description here: https://forum.joomla.org/viewtopic.php?f=811&t=998603#p3680327
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-29 18:13:56 |
Closed_By | ⇒ | JackKellyUK | |
Labels |
Added:
?
|
Full description here: https://forum.joomla.org/viewtopic.php?f=811&t=998603#p3680327
I'll respond on the post.
Great! Thanks for doing this so quickly. I look forward to seeing it in 4.2.7