Alternative layouts for article in joomla 3 - Joomla! Forum - community, help and support
i'm trying create new layouts articles. want every article have it's own alternative layout.
my structure:
5 artiles in 1 category named uncategorised.
5 menu items connected it's own article.
menu item 1 - article 1
menu item 2 - article 2
menu item 3 - article 3
menu item 4 - article 4
menu item 5 - article 5
i created 2 files here: template/xxxxx/html/com_content/article
default.php , default_links.php
i made changes in default.php , works because overrides file com_content/views/article/tmpl/default.php
the next step create 1 layout article, , problems have begun.
i created new layout here:
com_content/views/article/tmpl
i added default2.php, default2.xml , default2_links.php
i opened default.xml, copied default2.xml , replaced default default2 in script.
also created language file this.
then opened article, example article 4, tab article options , found alternative layout dropdown list. found there name of new layout default2.
i chose , saved.
but nothing happened. article still uses layout default instead of default2.
who knows possible use own layouts articles?
not overrided default, new names, example, newlayout1 separate file newlayout1.php, newlayout2 separate file newlayout2 , etc.
my structure:
5 artiles in 1 category named uncategorised.
5 menu items connected it's own article.
menu item 1 - article 1
menu item 2 - article 2
menu item 3 - article 3
menu item 4 - article 4
menu item 5 - article 5
i created 2 files here: template/xxxxx/html/com_content/article
default.php , default_links.php
i made changes in default.php , works because overrides file com_content/views/article/tmpl/default.php
the next step create 1 layout article, , problems have begun.
i created new layout here:
com_content/views/article/tmpl
i added default2.php, default2.xml , default2_links.php
i opened default.xml, copied default2.xml , replaced default default2 in script.
also created language file this.
then opened article, example article 4, tab article options , found alternative layout dropdown list. found there name of new layout default2.
i chose , saved.
but nothing happened. article still uses layout default instead of default2.
who knows possible use own layouts articles?
not overrided default, new names, example, newlayout1 separate file newlayout1.php, newlayout2 separate file newlayout2 , etc.
solved!
after did these points wrote need go menu item , change menu item type.
in case, artilces -> default2 because gave name default2.
addition: make changes in langauge file go language folder , find yourtemplate.sys.ini
add new name of layout there.
after did these points wrote need go menu item , change menu item type.
in case, artilces -> default2 because gave name default2.
addition: make changes in langauge file go language folder , find yourtemplate.sys.ini
add new name of layout there.
Comments
Post a Comment