-
AuthorPosts
-
dpchap015 Friend
dpchap015
- Join date:
- September 2011
- Posts:
- 300
- Downloads:
- 75
- Uploads:
- 57
- Thanks:
- 1
- Thanked:
- 24 times in 1 posts
February 25, 2014 at 4:42 am #195180Hi.
i want to know how can i add a new layout file for articles in Ja Magz .
just like video,text,gallary how can i add a new layout fileNazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
February 26, 2014 at 3:38 am #524392As default, JA Magz support 3 types for the article: Gallery, Video, Text. If you want to add a new type, you need to customise the new type yourself, then add that file into templatesja_magzhtmlcom_contentarticle.
Hope it helps.
dpchap015 Frienddpchap015
- Join date:
- September 2011
- Posts:
- 300
- Downloads:
- 75
- Uploads:
- 57
- Thanks:
- 1
- Thanked:
- 24 times in 1 posts
February 27, 2014 at 4:47 am #524568@nazario A
i created new article file and added it to templatesja_magzhtmlcom_contentarticle.
but in admin panel its not showing new file name, only default three layout are there.
so i added new type article in xml file of article in /templates/ja_magz/etc/form/com
_content.articleafter that its showing new type name in backend but it will not picking the new layout,
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
February 27, 2014 at 8:07 am #524589I’m afraid your requirement is heavy customization. Actually, after you added the new content type into /templatesja_magzhtmlcom_contentarticle folder, you need to declare this new content type in two files: /templates/ja_magz/templateHelper.php and /templatesja_magzhtmlcom_contentarticle.
dpchap015 Frienddpchap015
- Join date:
- September 2011
- Posts:
- 300
- Downloads:
- 75
- Uploads:
- 57
- Thanks:
- 1
- Thanked:
- 24 times in 1 posts
February 28, 2014 at 5:28 am #524709@nazario A
*as we know *JA Magz support 3 types for the article: Gallery, Video, Text.
if i will add a new type from *templatesja_magzhtmlcom_contentarticle.
in this case new layout is added successfully and working.
but problem is in the selection of new layout. i don’t want to select it from article options>*Alternative Layout> select layout.i want to select it from JA magz>content type>select type option.(text,gallary,video ).
i have not found any code to declare it in templatehelper.php
i found some declaration *of text,gallary,video type layout in*xml file of article in /templates/ja_magz/etc/form/com
_content.article. i added new type here but does`nt work
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
March 3, 2014 at 3:37 am #524978You should add a new option for the new type in this XML file:templatesja_magzetcformcom_content.article.xml
<form>
<fields name="attribs">
<fieldset name="tpl_extended_article" label="TPL_EX_GROUP_LABEL">
<field name="content_type" type="list" default="text"
label="TPL_EX_CONTENT_TYPE_LABEL"
description="TPL_EX_CONTENT_TYPE_DESC"
labelclass="control-label">
<option value="gallery">Gallery</option>
<option value="video">Video</option>
<option value="text">Text</option>
<option value="text">NewTypeHere</option>
</field>
....................
It should display as an option of Content Type in article settings: http://prntscr.com/2xzj7idpchap015 Frienddpchap015
- Join date:
- September 2011
- Posts:
- 300
- Downloads:
- 75
- Uploads:
- 57
- Thanks:
- 1
- Thanked:
- 24 times in 1 posts
March 5, 2014 at 5:53 am #525382<em>@Nazario A 414203 wrote:</em><blockquote>@dpchap015,
You should add a new option for the new type in this XML file:templatesja_magzetcformcom_content.article.xml
<form>
<fields name="attribs">
<fieldset name="tpl_extended_article" label="TPL_EX_GROUP_LABEL">
<field name="content_type" type="list" default="text"
label="TPL_EX_CONTENT_TYPE_LABEL"
description="TPL_EX_CONTENT_TYPE_DESC"
labelclass="control-label">
<option value="gallery">Gallery</option>
<option value="video">Video</option>
<option value="text">Text</option>
<option value="text">NewTypeHere</option>
</field>
....................
It should display as an option of Content Type in article settings: http://prntscr.com/2xzj7i</blockquote>@nazario A
as i defined in my #3 post in this thread, that i already tried it.
it will show the new type but it will not pick the new type.Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
March 5, 2014 at 5:21 pm #525486<blockquote>as i defined in my #3 post in this thread, that i already tried it.
it will show the new type but it will not pick the new type.</blockquote>Yes. As I mentioned in my #4 post:
<blockquote>You need to declare this new content type in two files: /templates/ja_magz/templateHelper.php and /templates/ja_magz/html/com_content/article.</blockquote>Look at these 2 files and see how we define these content types and customize as you wish. I’m sorry for not being of much help here as this requires customisation which is beyond scope of our support.
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 2 voices, and was last updated by Nazario A 10 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
How to Add a new layout for articles in Magz?
Viewing 8 posts - 1 through 8 (of 8 total)