-
To get a fresh start I suggest to download a copy of the Gantry-Rocketlauncher so you can’t mess up your site.
I guess for „Featured layouts“ you need to add „Alternative Menu Items“ instead of „Alternative Layouts“ (like you can see in my screenshot above) ...
Perhaps I'm wrong but I can only see a "template-style"-option but no "Alternative-layout"-option for this menu-item-type?
1. locate these files
templates/gantry/html/com_content/featured/default_item.php
templates/gantry/html/com_content/featured/default_links.php
templates/gantry/html/com_content/featured/default.php
duplicate those and rename them like
templates/gantry/html/com_content/featured/custom_item.php
templates/gantry/html/com_content/featured/custom_links.php
templates/gantry/html/com_content/featured/custom.php
2. locate this file
components/com_content/views/featured/tmpl/default.xml
copy that file to
templates/gantry/html/com_content/featured/
so you have these files now
templates/gantry/html/com_content/featured/custom_item.php
templates/gantry/html/com_content/featured/custom_links.php
templates/gantry/html/com_content/featured/custom.php
templates/gantry/html/com_content/featured/custom.xml
templates/gantry/html/com_content/featured/default_item.php
templates/gantry/html/com_content/featured/default_links.php
templates/gantry/html/com_content/featured/default.php
3. open this file
templates/gantry/html/com_content/featured/custom.xml
find
<layout title="COM_CONTENT_FEATURED_VIEW_DEFAULT_TITLE" option="COM_CONTENT_FEATURED_VIEW_DEFAULT_OPTION">
and change it to
<layout title="CUSTOM LAYOUT" option="CUSTOM_LAYOUT">
4. I guess you are using Joomla 3.3.
So create a folder-structure like this
templates/gantry/html/joomla/3.3/com_content/featured
5. locate these files
components/com_content/views/featured/tmpl/default_item.php
components/com_content/views/featured/tmpl/default_links.php
components/com_content/views/featured/tmpl/default.php
copy those to the folder you just created and rename them like this
templates/gantry/html/joomla/3.3/com_content/featured/custom_item.php
templates/gantry/html/joomla/3.3/com_content/featured/custom_links.php
templates/gantry/html/joomla/3.3/com_content/featured/custom.php
those are the files you work on. Personally I just throw a „Test“ into that file to see if the layout kicks in.
You can use other files as a starting point if you like to ...
6. Now you should be able to create a new menu-item of the type "CUSTOM LAYOUT"
This image is hidden for guests.
Please log in or register to see it.
Of course it’s a lot easier for „article layouts“. You don’t need all that xml stuff.
More info can be found here
https://docs.joomla.org/Layout_Overrides_in_Joomla
.
I hope I didn’t forget a step.
-
Last Edit: 10 years 2 months ago by Henning.
-
The following users have thanked you: DanG, MrT