-
AuthorPosts
-
ntonline Friend
ntonline
- Join date:
- January 2009
- Posts:
- 164
- Downloads:
- 31
- Uploads:
- 42
- Thanks:
- 24
- Thanked:
- 12 times in 1 posts
January 26, 2012 at 8:35 pm #173236I 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 Stablepixelzombie Friendpixelzombie
- Join date:
- August 2010
- Posts:
- 339
- Downloads:
- 2
- Uploads:
- 49
- Thanks:
- 32
- Thanked:
- 168 times in 107 posts
January 27, 2012 at 1:02 am #435634Hi!
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 Friendntonline
- Join date:
- January 2009
- Posts:
- 164
- Downloads:
- 31
- Uploads:
- 42
- Thanks:
- 24
- Thanked:
- 12 times in 1 posts
January 27, 2012 at 10:59 pm #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 Friendpixelzombie
- Join date:
- August 2010
- Posts:
- 339
- Downloads:
- 2
- Uploads:
- 49
- Thanks:
- 32
- Thanked:
- 168 times in 107 posts
January 28, 2012 at 12:04 am #435803Just 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
1 user says Thank You to pixelzombie for this useful post
ntonline Friendntonline
- Join date:
- January 2009
- Posts:
- 164
- Downloads:
- 31
- Uploads:
- 42
- Thanks:
- 24
- Thanked:
- 12 times in 1 posts
January 28, 2012 at 4:36 pm #435897Frank,
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 Friendpixelzombie
- Join date:
- August 2010
- Posts:
- 339
- Downloads:
- 2
- Uploads:
- 49
- Thanks:
- 32
- Thanked:
- 168 times in 107 posts
January 28, 2012 at 11:40 pm #435959Well, 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
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by pixelzombie 12 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum