-
AuthorPosts
-
September 5, 2011 at 3:32 pm #168191
Hello,
I’m trying to redo the sample concerning a shop template found on the JA T3 Framework 1.0 FAQ.
The goal was to add two new module positions « featured-products » and « new-products ».Now I would like to do the same with the JA T3 Framework 2.0.
The module positions are the same as content.mass.top and content.mass.botom (I know I could use them, this is not the problem).My first idea was to add the new modules on the layout xml file
<blocks name="middle" colwidth="20" fixheight="1">
<block name="left1">left</block>
<block name="products" type="modules" style="xhtml" >my-featured-products</block>
<block name="right1">right</block>
</blocks>Because this was not working, I used the JA T3 Framework 1.0 FAQ way, means creating a products.php file
located to ja_t3_blanklocaletclayout and containing<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?><div class="ja-mass clearfix">
<jdoc:include type="modules" name="featured-products" style="JAxhtml" />
</div>
<div class="ja-mass clearfix">
<jdoc:include type="modules" name="new-products" style="JAxhtml" />
</div>
My basic questions are :
Is it possible to add a module position from the layout xml itself file or is it still necessary to add an extra php file. ?
Could someone give me a sample that match my goal ?
Please do not answer with just a link to the Ja t3 framework 2.0 doc because I read (and print) all of them more than one time and have still no clue…(for other things theme and profile everything is just fine).
Thanks
September 5, 2011 at 9:12 pm #410835I also followed this tutorial (new module position at the end)
http://www.youtube.com/watch?v=XHL13nKgs1k
Creating this php file and set it to the template block folder
<?php /* products featured */ ?>
<?php $this->genBlockBegin ($block) ?>
<div class="ja-products">
<jdoc:include type="modules" name="products" />
</div>
<?php $this->genBlockEnd ($block) ?>
Call the php block from the layout
<?xml version="1.0" encoding="utf-8"?>
<layout name="desktop">
<!--Extra css load for this layout-->
<stylesheets>
</stylesheets>
<blocks name="top" style="xhtml">
<block name="absolute" type="modules" style="raw">absolute</block>
<block name="top-panel" type="modules" style="raw" main-inner="1">top-panel</block>
<block name="header" type="header" main-inner="1"></block>
<block name="mainnav" type="mainnav" main-inner="1"></block>
<block name="cpanel" type="usertools/cpanel"></block>
<block name="topsl" type="spotlight" main-inner="1">user1,user2,user3,user4,user5</block>
</blocks>
<blocks name="middle" colwidth="20" fixheight="1">
<block name="left1">left</block>
<block name="products" type="products"></block>
<block name="right1">right</block>
</blocks>
<blocks name="bottom" style="xhtml">
<block name="botsl" type="spotlight" main-inner="1">user6,user7,user8,user9,user10</block>
<block name="navhelper" type="navhelper" main-inner="1"></block>
<block name="footer" type="footer"></block>
</blocks>
</layout>I add the module position to the templatedetails.xml
<position>products</position>
Still not working (with no mistake…just no new position)…Is this tutorial corresponding to the actual 2.0 framework ?
-
AuthorPosts
This topic contains 2 replies, has 1 voice, and was last updated by stilgar 13 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum