Moe
Moe

Reputation: 4792

Joomla - Category Blog Alternative Layout Not Being Applied

So I'm a little confused by Joomla's Alternative Layout overrides.

I'm using Joomla 3.3

I have read all Joomla 3.x documentation, and have followed many tutorials without any luck.

So here are my template files:

enter image description here

Promo is the name of the alternative layout which I would like to activate for one of my Category Pages.

enter image description here

So it appears as an alternative layout without a problem.

Then I've gone ahead and made the menu item: enter image description here

However when I go on the page, it calls the blog.php override only and not the promo.php layout

What am I doing wrong here?

Upvotes: 4

Views: 1787

Answers (2)

Elin
Elin

Reputation: 6755

To expand on @itoctopus, there are two different things, an alternative layout and an alternate menu layout. If you make a direct menu link you must use the latter. For this you need the xml file, and at that point it will show up in your list of menu options. Alternative layouts are applied to items and the do not show up in the menu options. The menu always overrides the item. There are some additional options you can play around with.

Upvotes: 1

itoctopus
itoctopus

Reputation: 4251

Where is your promo.xml file? You should have one in the same directory where you have your promo.php file. The promo.xml file should be a copy of the blog.xml file located under the public_html/components/com_content/views/category/tmpl folder. You will only need to change the line:

<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE" option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">

to

<layout title="promo" option="promo">

And then when you create a menu item, choose its type to be promo.

Upvotes: 6

Related Questions