test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Jorge Gama Friend
    #197900

    Hello all.

    I’ve been playing around with your wondeful Purity III template and trying to personalize it by adding some “extra” features. All seemed to work fine, something odd is happening. I’ll explain.

    Let’s say, for example, I wanted to add more configuration options to the template, such as to enable or disable the sticky menu and a “sticky logo”. I added these lines of code to the templateDetails.xml file (included is some of the original file as to show were the code was added):


    <!-- Sample for add or disable template parameters -->
    <!--fieldset name="menu_params" label="T3_PARAMS_MEGAMENU">
    <field name="group_disable" type="t3depend" function="@group">
    <option for="menu_as_bg" value="no">menu_as_bg</option>
    </field>
    </fieldset-->

    <fieldset name="purity_iii_params" label="TPL_EXTENDED_TAB_LABEL" description="TPL_EXTENDED_TAB_LABEL">

    <field name="tpl_article_info_datetime_format" type="list" default="d M Y"
    global="1"
    label="TPL_ARTICLE_INFO_DATETIME_FORMAT_LABEL"
    description="TPL_ARTICLE_INFO_DATETIME_FORMAT_DESC">
    <option value="d M Y">TPL_DATE_SHORT</option>
    <option value="d F Y">TPL_DATE_FULL_MONTH</option>
    <option value="l, d F Y">TPL_DATE_FULL</option>
    </field>

    </fieldset>

    <!-- Addon for theme -->
    <fieldset name="addon_params" label="T3_ADDON_LABEL" description="T3_ADDON_DESC">

    <field type="t3depend" function="@legend" label="T3_EXTRA_ADDONS_MM_GROUP_LABEL" description="T3_EXTRA_ADDONS_MM_GROUP_DESC" />

    <field name="t3-stickymenu" type="radio" default="1"
    global="1"
    label="T3_ADDON_STICKYMENU"
    description="T3_ADDON_STICKYMENU_DESC">
    <option value="0" class="off">JNO</option>
    <option value="1" class="on">JYES</option>
    </field>

    <field name="t3-stickylogo" type="radio" default="1"
    global="1"
    label="T3_ADDON_STICKYLOGO"
    description="T3_ADDON_STICKYMENU_DESC">
    <option value="0" class="off">JNO</option>
    <option value="1" class="on">JYES</option>
    </field>

    </fieldset>
    <!-- //Addon for theme -->

    OK, so far, so good. The options are available in the backend and they work. The main issue is that when these options are saved in one style, let’s say the Blog Style, they are also changed on all the other styles. I would like to be able to control these new options individually in each style. Is this possible?

    wingly Friend
    #535572

    @jorgeg;

    TO what file have you implemented these changes?

    Jorge Gama Friend
    #535578

    I added the changes to the templateDetails.xml file.

    Jorge Gama Friend
    #535583

    Well, this is awkward… :-[ Apparently I overlooked one small detail and only noticed it now.

    For those interested, the global=”1″ parameter in the field type applies the changes/values to all the template styles. Changing it to global=”0″ solved my issue and now each style will have it’s own options.

    Hope this might help someone else in the future.

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

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

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