Actions

J1.5 talk

Difference between revisions of "How to control Category List layouts when drilling from a Section Layout"

From Joomla! Documentation

m (New page: The only problem with this technique is that your secondary (e.g. left-hand) menu won't show up. Instead of assigning to a hidden menu, it works just as well (in this case) to add them to ...)
 
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
[[User:Markroy|Markroy]] 20:25, 22 June 2009 (UTC)
 
[[User:Markroy|Markroy]] 20:25, 22 June 2009 (UTC)
 +
 +
 +
I tried to create a "hidden" menu in the JA purity template, and it wouldnt let me create one without a module.
 +
 +
---
 +
 +
This should be no problem. You can hide a menu by (a) disabling the module or (b) selecting (o)None in Menu Assignment block.
 +
 +
Another idea could be to make these category menu entries sub menu entries of sections menu entry. This was the way I found the problem with the blog layout: I tried to create a menu entry to the section with sub entries to its categories. It worked fine but by selecting the section and then a category the list layout was used instead of blog layout.
 +
So I found "layout=blog" AND "layout=default" and the causing code in view.html.php as described.
 +
But my personal hack was a bit more complicated to ensure always a layout is specified: I appended following block
 +
 +
    if (stripos($category->link, '&layout=') === false) {
 +
        $category->link .= '&layout=default';
 +
    }
 +
 +
This appends '&layout=default' if there is no layout specified.
 +
 +
[[User:Hoffi|Hoffi]] 16:20, 21 September 2010 (UTC)

Latest revision as of 21:05, 26 May 2013

The only problem with this technique is that your secondary (e.g. left-hand) menu won't show up. Instead of assigning to a hidden menu, it works just as well (in this case) to add them to the main menu. If you really don't want to see them, you can reduce the mod_mainmenu "End Level".

My breadcrumbs aren't showing up either, but that may be a template problem(?)

Markroy 20:25, 22 June 2009 (UTC)


I tried to create a "hidden" menu in the JA purity template, and it wouldnt let me create one without a module.

---

This should be no problem. You can hide a menu by (a) disabling the module or (b) selecting (o)None in Menu Assignment block.

Another idea could be to make these category menu entries sub menu entries of sections menu entry. This was the way I found the problem with the blog layout: I tried to create a menu entry to the section with sub entries to its categories. It worked fine but by selecting the section and then a category the list layout was used instead of blog layout. So I found "layout=blog" AND "layout=default" and the causing code in view.html.php as described. But my personal hack was a bit more complicated to ensure always a layout is specified: I appended following block

   if (stripos($category->link, '&layout=') === false) {
       $category->link .= '&layout=default';
   }

This appends '&layout=default' if there is no layout specified.

Hoffi 16:20, 21 September 2010 (UTC)