test
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • webjwn Friend
    #193786

    Hi guys,

    In JAT3, you can customize the header or footer by putting the same name files in your own theme folder:

    /templates/ja_onepage/themes/my_own_theme/blocks/header.php
    /templates/ja_onepage/themes/my_own_theme/blocks/footer.php

    I used to copy these 2 file from Ja template’s default ones or from plugins/system/JAT3/JAT folder.

    It looks the ja tempalte structure has been chagned, so:

    What is the correct way to do the same thing in T3 so that when I update/upgrade JA Framework they are not overriden?

    Thanks,
    jwn

    phong nam Friend
    #518632

    @jwn: This is an interesting question on modifying our T3 layout. Well, I wish to clarify a little bit 2 points:

    – All layouts/blocks of our T3 templates (i.e Onepage) are defined inside templates/ja_template/tpls/ folder. You can not move the blocks to any theme folder, even on T3v2 templates.

    – And all block/layout files inside the template will be overridden when updating.

    So, I would suggest you a workaround to keep your modified layouts when updating:

    You can duplicate and rename the block/layout files, then configure the template styles with the new layout. i.e:

    – Change footer.php (block) to footer-modify.php
    – Change default.php (layout) to default-modify.php
    – Call new footer block inside default-modify.php with:

    <?php $this->loadBlock ('footer-modify') ?>

    Hope that helps.

    webjwn Friend
    #518721

    <em>@Leo Burnetts 406139 wrote:</em><blockquote>@jwn: This is an interesting question on modifying our T3 layout. Well, I wish to clarify a little bit 2 points:

    You can duplicate and rename the block/layout files, then configure the template styles with the new layout. i.e:

    – Change footer.php (block) to footer-modify.php
    – Change default.php (layout) to default-modify.php
    – Call new footer block inside default-modify.php with:

    <?php $this->loadBlock ('footer-modify') ?>

    Hope that helps.</blockquote>

    Hi Leo,

    Thank you for your reply. Just a couple things I don’t understand in your workaround:

    1. Should I keep the footer.php after I duplicate and rename to get the new footer-modify.php?
    2. Should I keep the default.php in its original place after I duplicate and rename to get the new default-modify.php?
    3. When default.php and default-modify.php appear at the same folder, how the system know it should use default-modify.php instead of default.php?

    I appreciate it if you can clarify this for me.

    Thanks again,
    jwn

    phong nam Friend
    #518724

    Hi jwn,

    I would like to answer your questions as follows:

    1. Yes. You can keep it.

    2. Yes. You can keep it too.

    3. Our T3 plugin is built to display the files inside templates/ja_template(Onepage)/tpls/ as the layouts (i.e Home, Default , Default-modify…). Do not worry about this.

    In fact, the main purpose of my solution is preventing your modification on template layouts/blocks from overriding when updating template. Because, the template will just override the same template file names with content, NOT renamed files.

    In addition, the template update always comes from the less/css files in /less/, /css/ folder and .js files in /js/ folder. And we rarely update the template layouts in /tpls/ folder.

    webjwn Friend
    #518874

    <em>@Leo Burnetts 406247 wrote:</em><blockquote>Hi jwn,

    I would like to answer your questions as follows:

    1. Yes. You can keep it.

    2. Yes. You can keep it too.

    3. Our T3 plugin is built to display the files inside templates/ja_template(Onepage)/tpls/ as the layouts (i.e Home, Default , Default-modify…). Do not worry about this.

    In fact, the main purpose of my solution is preventing your modification on template layouts/blocks from overriding when updating template. Because, the template will just override the same template file names with content, NOT renamed files.

    In addition, the template update always comes from the less/css files in /less/, /css/ folder and .js files in /js/ folder. And we rarely update the template layouts in /tpls/ folder.</blockquote>

    Hi Leo,

    Thank you for your confirmation, but it looks it does not work for me. This is my tpls/ folder file structure:


    `-- tpls
    |-- blocks
    | |-- footer-modify.php
    | |-- footer.php
    | |-- head.php
    | |-- header.php
    | |-- mainbody-content-left.php
    | |-- mainbody-content-right.php
    | |-- mainbody-home-1.php
    | |-- mainbody-home-2.php
    | |-- mainbody.php
    | |-- mainnav.php
    | |-- navhelper.php
    | |-- onepage.php
    | |-- spotlight-1.php
    | `-- spotlight-2.php
    |-- default-content-left-copy.php
    |-- default-content-left.php
    |-- default-content-right.php
    |-- default-modify.php
    |-- default.php
    `-- onepage.php

    The issues:

    My Goal: to get our own footer on the bottom:
    So
    1) in tpls/blocks, I got footer-modify.php;
    2) in tpls/, I got default-modify.php
    as you instructed;

    I keep defautl.php and blocks/footer.php not touched;

    Problems:
    1) default-modify.php is NOT caught and used by the T3 plugin automatically; so I tried the next step:

    2) In the default.php, I change the line for footer to use my footer-modify:

    [PHP] <?php $this->loadBlock (‘footer-modify’) ?>[/PHP]

    This does NOT work either.

    So I modified the footer.php, and inserted my code there, and it works. But I know my code will be wiped out the next time I update T3 framework.

    Any idea, what I missed?

    Thanks,
    Ray

    phong nam Friend
    #519032

    Hi Ray,

    You missed to select the new layout (Default-modify) in Layout tabs of template styles. That is why the selected menu pages did not display the new layout positions.


    1. modify
    webjwn Friend
    #519140

    <em>@Leo Burnetts 406668 wrote:</em><blockquote>Hi Ray,

    You missed to select the new layout (Default-modify) in Layout tabs of template styles. That is why the selected menu pages did not display the new layout positions.</blockquote>

    Hi Leo,

    Thank you so much for your help. It just works like charm now. I appreciate it highly.

    Ray

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 2 voices, and was last updated by  webjwn 10 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum