Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • viniciusrtf Friend
    #194014

    Hi folks,

    I’ve been searching for a way to allow the end-user to enable/disable the responsiveness of my website, just like this one: http://m.uol.com.br which have a link called “Web” on footer, allowing the non-responsive version even if your’re in small viewport version.

    I built my website in Joomla 3.2 + T3 Framework 2.0.2 + T3 BS3 Blank + custom style.

    So far, I could only think of one solution:
    – Maintain the responsive feature enabled in my default style.
    – Duplicate “T3 BS3 Blank” template as “T3 BS3 Blank – non-responsive” and setup a non-responsive style
    – Install some extension for template switching from frontend.

    I think this will be painful to maintain, with a LOT of duplicated code.

    Anyone have a better solution? Is there a way to switch only the template style from frontend?

    I can reveal the URL through PM.

    Best regards.

    viniciusrtf Friend
    #519702

    I will try to clarify a little bit.

    How could I disable responsiveness only within a Syle, and not in a global way (within a T3-based template)?

    The result I’m trying to achieve is having a responsive Style and a non-responsive Style, both based on t3_b3_blank, so I can switch between them in the frontend with Template Selector extension. I’m also trying to avoid duplicating t3_bs3_blank template to achieve this.

    viniciusrtf Friend
    #520358

    Anyone? Can’t find an elegant solution.

    Wall Crasher Developer
    #520370

    @ viniciusrtf,

    If you want to disable the global attribute of Responsive option, you can follow workaround below:

    <config>
    <fields name="params" addfieldpath="/plugins/system/t3/includes/depend">

    <fieldset name="general_params" label="T3_GENERAL_LABEL" description="T3_GENERAL_DESC">
    <field name="responsive" type="radio" default="1"

    label="T3_GENERAL_RESPONSIVE_LABEL"
    description="T3_GENERAL_RESPONSIVE_DESC">
    <option value="0" class="off">JNO</option>
    <option value="1" class="on">JYES</option>
    </field>

    <field name="non_responsive_width" type="text" default="970px"

    label="T3_GENERAL_NON_RESPON_WIDTH_LABEL"
    description="T3_GENERAL_NON_RESPON_WIDTH_DESC"/>
    </fieldset>

    </fields>
    </config>

    Add the block code above to templateDetails.xml file.

    Hope it helps,

    viniciusrtf Friend
    #521152

    <em>@Wall Crasher 408362 wrote:</em><blockquote>@ viniciusrtf,

    If you want to disable the global attribute of Responsive option, you can follow workaround below:

    <config>
    <fields name="params" addfieldpath="/plugins/system/t3/includes/depend">

    <fieldset name="general_params" label="T3_GENERAL_LABEL" description="T3_GENERAL_DESC">
    <field name="responsive" type="radio" default="1"

    label="T3_GENERAL_RESPONSIVE_LABEL"
    description="T3_GENERAL_RESPONSIVE_DESC">
    <option value="0" class="off">JNO</option>
    <option value="1" class="on">JYES</option>
    </field>

    <field name="non_responsive_width" type="text" default="970px"

    label="T3_GENERAL_NON_RESPON_WIDTH_LABEL"
    description="T3_GENERAL_NON_RESPON_WIDTH_DESC"/>
    </fieldset>

    </fields>
    </config>

    Add the block code above to templateDetails.xml file.

    Hope it helps,</blockquote>

    This workaround not only helps, it seems to solve the problem! The core of the problem was the fact of “Enable Responsive” option being global.

    Now I can set up two styles, with just few different PHP files between them, but sharing customized CSS, JS, T3 core files and the base template files. I can also use the free Template Selector extension to switch between responsive and non-responsive versions. The user choice is stored as a cookie.

    Thanks a lot!

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

This topic contains 5 replies, has 2 voices, and was last updated by  viniciusrtf 10 years, 9 months ago.

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