Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • dpchap015 Friend
    #195180

    Hi.
    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 file

    Nazario A Friend
    #524392

    @dpchap015,

    As 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 Friend
    #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.article

    after that its showing new type name in backend but it will not picking the new layout,

    Nazario A Friend
    #524589

    @dpchap015,

    I’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 Friend
    #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


    1. EdTechReview™-ETR-Administration-Article-Manager-Edit-Article
    Nazario A Friend
    #524978

    @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

    dpchap015 Friend
    #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 Friend
    #525486

    @dpchap015,

    <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.

Viewing 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