In your template you create the below
mytemplatename\html\com_content\category
and inside the category folder i create my custom category blog layout. (in my case i just copy the blog.php and blog-item.php from the default com_content of my site and i renamed them as myblog.php and myblog-item.php and just did some minor changes in the layout inside (css stuff).
after that, from the administrator backend i go to Categories i choose the category i want to have a different layout and from the option tab i choose the alternative category layout i created (myblog).
when i make a menu item as a category blog with the specific category, it should have the alternative layout from the category option.
index.php?option=com_content&view=category&layout=mytemplatename:myblog
when i make a menu item as a category blog with the specific category, it still sets the category blog layout as blog (which is the default view).
index.php?option=com_content&view=category&layout=blog
Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
In my opinion in the menu option when you choose Category Blog, in the link creation it should check the category that you have chosen and if the category has an alternative layout selected it should have that one.
@pnkr I'm not getting if you're filing this as a "bug* or as a "request for enhancement"...
If it is the former, then I think there is a basic misunderstanding: what you're trying to do is not to create a different "Template Style", but a new "Menu Item Type" (based on a core "Menu Item Type").
To achieve that you must: copy all related files to the override directory, change their names accordingly and modify the .xml file:
blog_children.php
, blog_links.php
and, most important, blog.xml
From:
<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE" option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
To:
<layout title="My blog" option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
Having done that, when you go to Menu Manager and create a new item, you will have (under "Articles") the choice of a new menu type named "My blog": this is what you'll want to use and not "Category Blog":
If instead yours is a request for feature enhancement, to associate categories name to layout names, then I don't think this is a good idea because you could be willing to use the same modified layout for many different categories with different "names" (think of a multilingual site where in different languages you may have different names for the *same category...*), and when you'll want to make a modification to that layout you'll have to do it n times...
oh my bad. I did not "get the login" in the first place. Thanks for the info!!!!
your post was very helpful.
OK, no problem, but next time before "filing an issue", ask around... Usually http://forum.joomla.org/ is a good place to start.
Cheers!
Can someone please close the issue?
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-12-29 16:37:21 |
Closed_By | ⇒ | rdeutz |
not a bug
Labels |
Added:
?
|
@pnkr
Please try with
myblog_item.php
asmyblog-item.php
is IIRC not accepted. (se the-
and_