Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • ntonline Friend
    #173236

    I am attempting to customize the JA Anion iPhone template by modifying the template layout in the following way:


    <?xml version="1.0" encoding="utf-8"?>
    <layout body-class="bd-iphone" device="iphone">
    <name>Iphone</name>
    <description>Default layout for Iphone</description>
    <!--Extra css load for this layout-->
    <stylesheets>
    <file>css/iphone/layout.css</file>
    <file>css/iphone/template.css</file>
    </stylesheets>
    <scripts>
    <file>js/iphone.js</file>
    </scripts>
    <blocks name="top" style="xhtml">
    <block name="mainnav" type="iphone/mainnav" class="black"></block>
    <block name="header" type="iphone/header"></block>
    </blocks>
    <blocks name="middle">
    <block name="right1" type="iphone/right1"></block>
    </blocks>
    <blocks name="bottom" style="xhtml">
    <block name="footer" type="iphone/footer"></block>
    </blocks>
    </layout>

    It’s hard to see, but I added the following:


    <blocks name="middle">
    <block name="right1" type="iphone/right1"></block>
    </blocks>

    After I updated the layout, I tried to view the changes on the iPhone, but the template did not change from it’s original template. What steps am I missing, or rather, where should I begin to customize the iPhone template?

    System Information:
    Database Version: 5.0.92-community
    PHP Version: 5.2.17
    Joomla! Version: 1.7.2 Stable

    pixelzombie Friend
    #435634

    Hi!

    I don’t think there is a block type iphone/right1. Can you please check this thread http://www.joomlart.com/forums/topic/different-articles-in-frontpage-for-desktop-and-iphone/ and tell me if that suits your needs?

    Cheers

    Frank

    ntonline Friend
    #435791

    <em>@pixelzombie 297058 wrote:</em><blockquote>I don’t think there is a block type iphone/right1. Can you please check this thread http://www.joomlart.com/forums/topic/different-articles-in-frontpage-for-desktop-and-iphone/ and tell me if that suits your needs?</blockquote>

    I looked over the code for the default template and found there is a block name of “right1”. Here’s the code from the JA Anion default template:


    <?xml version="1.0" encoding="utf-8"?>
    <layout>
    <name>Default</name>
    <description>Default layout for JA Anion template</description>
    <blocks name="top" style="xhtml">
    <block name="header" type="header"></block>
    <block name="cpanel" type="usertools/cpanel"></block>
    <block name="mainnav" type="mainnav" markup="3"></block>
    </blocks>
    <blocks name="middle" colwidth="20" markup="3">
    <block name="content-mass-top" style="raw">content-mass-top</block>
    <block name="content-top">content-top</block>
    <block name="inset1" width="20">left</block>
    <block name="right1" width="30">right</block>
    </blocks>
    <blocks name="bottom" style="xhtml">
    <block name="botsl" type="spotlight" markup="3">user5,user6,user7,user8</block>
    <block name="navhelper" type="navhelper" markup="3"></block>
    <block name="footer" type="footer" main-inner="1"></block>
    </blocks>
    </layout>

    I modified the iphone template and added the block to the “middle” section as follows:


    <?xml version="1.0" encoding="utf-8"?>
    <layout body-class="bd-iphone" device="iphone">
    <name>Iphone</name>
    <description>Default layout for Iphone</description>
    <!--Extra css load for this layout-->
    <stylesheets>
    <file>css/iphone/layout.css</file>
    <file>css/iphone/template.css</file>
    </stylesheets>
    <scripts>
    <file>js/iphone.js</file>
    </scripts>
    <blocks name="top" style="xhtml">
    <block name="mainnav" type="iphone/mainnav" class="black"></block>
    <block name="header" type="iphone/header"></block>
    </blocks>
    <blocks name="middle">
    <block name="content-mass-top" type="iphone/content-mass-top">user1</block>
    </blocks>
    <blocks name="bottom" style="xhtml">
    <block name="footer" type="iphone/footer"></block>
    </blocks>
    </layout>

    I updated the template.css file in the iphone directory, but the new block does not appear on the iphone as expected. I took a look at the article you mentioned and tried following those instructions to no avail as well. What am I missing?

    pixelzombie Friend
    #435803

    Just tested your layout and it works fine if you remove type=”iphone/content-mass-top”. The t3 plugin doesn’t know what type this module is so it won’t render. Just enter


    <block name="content-mass-top">user1</block>

    Cheers

    Frank

    ntonline Friend
    #435897

    Frank,

    It worked. Thanks for the help.

    Is there any particular reason why the t3 plugin doesn’t recognize this module with the type identified? It recognizes the rest of the modules with the type identified. Why not this one? I’m trying to get a better understanding of t3.

    ntonline

    pixelzombie Friend
    #435959

    Well, it’s the way the plugin works at this time. If the module type is not defined, it won’t render. This is something that’s missing in the documentation at the moment – the documentation will be extended soon.

    Sorry, I can’t describe any further 🙂 Sometimes it’s just trial and error mate :-[

    Glad it worked out for you anyways 🙂

    Cheers

    Frank

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

This topic contains 6 replies, has 2 voices, and was last updated by  pixelzombie 12 years, 9 months ago.

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