?
avatar dandpclements
dandpclements
14 Mar 2020

I am creating a ‘cut down’ version of a website for use on a mobile. It runs as part of the main website.

The main website uses template layout A and the mobile version uses template B. Both sites have their own separate menus.

Both versions need to display articles for a category. The main site has a menu item to display a category blog, the mobile site has a menu item for category list to keep it simple

Using either menu item works ok and the list or blog appears ok with the correct template. The problem occurs when I then select an article from the list to display.

  • The main site displays the article ok with the correct template
  • The mobile site displays the article, however it uses the main site menu item to display it, so it appears with the template of the main site rather than the mobile site

If I temporarily unpublish the main site menu item then the mobile site displays the article ok using the correct template under the mobile menu item

It seems to me that when an article is selected to be displayed, Joomla uses the category to find the menu item and just uses the first one it finds – in this case the main site one.

The only way I have been able to get round this is to create a second category for the mobile version and put copies of the articles in it. The site then works ok, but it creates a maintenance overhead of having to remember to keep two categories in step.

System information (as much as possible)

Additional comments

avatar dandpclements dandpclements - open - 14 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Mar 2020
avatar brianteeman
brianteeman - comment - 14 Mar 2020

It seems to me that when an article is selected to be displayed, Joomla uses the category to find the menu item and just uses the first one it finds – in this case the main site one.

Yes that's pretty much the way joomla works. Whichever menu item has the lowest itemid will be the one that is used when you access the article

avatar brianteeman
brianteeman - comment - 27 Mar 2020

Closing as its the expected behaviour

avatar brianteeman brianteeman - close - 27 Mar 2020
avatar brianteeman brianteeman - change - 27 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-27 17:41:32
Closed_By brianteeman
avatar infograf768
infograf768 - comment - 28 Mar 2020

The fact that it is a known issue (cat list vs cat blog for the same category) does not make it expected. It is imho a long standing bug that we were unable to solve.

Add a Comment

Login with GitHub to post a comment