Setting Joomla's "default page" for tag searches in Gantry 5
Posted 8 years 4 months ago
First, please accept my apology for this post if the topic has already been covered. Before writing this post, I did try searching and did not see anything that covered the topic exactly.
For a rather large website I've been working on for a few months, I discovered an anomaly today when testing the Search function. Within the search parameters, I selected the "tags" item which brought up a number of results, the first of which was the tag itself followed by article titles. Clicking any of the article titles in the list following the tag brought the expected result displaying in what I've set as Gantry's Default Layout. However, clicking on the tag link brings up the same list of titles, any of which when clicked proceeds to display the page using the Home Layout.
My question is how do I configure Gantry to use its Default Layout for Joomla default pages such as when it needs to render a page for articles not within the typical menu structure?
The website I'm working on was converted from WordPress and has thousands of articles, most of which the client wants to be available to viewers who use the Joomla search function.
I've encountered similar situations in the past with setting up certain modules that I needed to render on search result pages, and the "trick" with that was to set up the page as desired within a hidden menu. So I've created a number of hidden menu items using the various Tags Menu options hoping that would help, and even published the "tags list" menu item on the front end.
However, the results are mixed. If choosing one of the items in the Tags List menu, the articles that show in the resulting list DO render in the Default Layout. However, using the search function as described, items display using the Home Layout.
I've tried clearing Joomla, Gantry and browser caches. The results are all the same.
The site is running Joomla 3.6.4 with the latest Gantry and Requiem templates. In the Layout Assignment screen I have all menu items except the site's Home and Gantry Home assigned to the Default Layout.
Any idea what might be going on here? I'm not really a novice. Ive been using Joomla since 2008 on dozens of websites, and have been an RT club member since 2009.
Re: Setting Joomla's "default page" for tag searches in Gantry 5
Posted 8 years 4 months ago
This is normal Joomla behaviour for "orphaned" or "menuless" articles. To get around this use the hidden-menu technique.
Create a MENU called "hidden" (no need to create a module to place it anywhere). In the hidden menu, create a MENU ITEM for each of the orphaned articles (single article type) and make sure these menu items are published. Now the hidden menu won't appear on any of your pages, but, the articles will now open in their own page. You can also use the same technique and create a hidden category blog menu item to pick up multiple articles too, thus saving having to create a hidden menu item for every article.
What you need to do is look at the links with Firebug to see what's going on... I would also advise turning off SEF and url rewriting so you can see the links actually being used (rather than SEF ones). So, is the problem 1. link without menu item id, 2. link with wrong menu item Id.
Regards, Mark.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.