-
AuthorPosts
-
September 4, 2008 at 7:01 pm #132968
Hello. We have modified helio visually for 2 sections of a site.
Now we need to rename all of the module positions so that we can fine tune where modules display in these 2 different site sections.
So I opened up the template XML file, and modified the template name, and changed all of the module positions so that they are prefixed. So instead of user1, user2, right, they are named specuser1, specuser2, specright, etc.
Then I opened up the templates index.php file and changed all the module position names so that they matched the names I set in the template XML file.
So far so good. I zipped it back up and installed via the site manager. The modified template has a unique name, and when I add ?tp=1 to the URL i can see all of the module positions, and they are named as I set them.
But the problem is when I assign a module to one of these positions, nothing shows up!
Can you please help? Below is a code sample of what the changes I made to the index.php file look like.
<!-- BEGIN: MAIN NAVIGATION -->
<div id="ja-mainnavwrap">
<div id="ja-mainnav">
<?php $jamenu->genMenu (0); ?>
<?php if ($this->countModules('pubuser4')) { ?>
<div id="ja-search">
<jdoc:include type="modules" name="pubuser4" style="raw" />
</div>
<?php } ?>
</div>
</div>
<!-- END: MAIN NAVIGATION --><!-- BEGIN: HEADER -->
<div id="ja-headerwrap">
<div id="ja-header" class="clearfix"><?php
$siteName = $tmpTools->sitename();
if ($tmpTools->getParam('logoType')=='image') { ?>
<h1 class="logo">
<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
</h1>
<?php } else {
$logoText = (trim($tmpTools->getParam('logoText'))=='') ? $config->sitename : $tmpTools->getParam('logoText');
$sloganText = (trim($tmpTools->getParam('sloganText'))=='') ? JText::_('SITE SLOGAN') : $tmpTools->getParam('sloganText'); ?>
<h1 class="logo-text">
<a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a>
</h1>
<p class="site-slogan"><?php echo $sloganText;?></p>
<?php } ?><?php if ($this->countModules('pubtop')) { ?>
<div id="ja-login">
<jdoc:include type="modules" name="pubtop" style="raw" />
</div>
<?php } ?></div>
</div>
<!-- END: HEADER --><div id="ja-containerwrap<?php echo $divid; ?>">
<div id="ja-container" class="clearfix"><div id="ja-mainbody" class="clearfix">
<?php if ($this->countModules('pubuser5') && $ja_right) { ?>
<!-- BEGIN: TOPSPOTLIGHT -->
<div id="ja-topsl">
<jdoc:include type="modules" name="pubuser5" style="raw" />
</div>
<!-- END: TOPSPOTLIGHT -->
<?php } ?><!-- BEGIN: CONTENT -->
<div id="ja-content" class="clearfix"><jdoc:include type="message" />
<div id="ja-current-content" class="clearfix">
<!-- BEGIN: PATHWAY -->
<div id="ja-pathwaywrap"><div id="ja-pathway"><div class="ja-innerpad">
<jdoc:include type="module" name="breadcrumbs" />
</div></div></div>
<!-- END: PATHWAY --><jdoc:include type="component" />
<?php if($this->countModules('pubbanner')) : ?>
<!-- BEGIN: BANNER -->
<div id="ja-banner">
<jdoc:include type="modules" name="pubbanner" />
</div>
<!-- END: BANNER -->
<?php endif; ?></div>
</div>
<!-- END: CONTENT --><?php if ($ja_left) { ?>
<!-- BEGIN: LEFT COLUMN -->
<div id="ja-col1">
<div class="ja-innerpad">
<jdoc:include type="modules" name="publeft" style="rounded" />
</div>
</div><br />
<!-- END: LEFT COLUMN -->
<?php } ?></div>
<?php if ($ja_right) { ?>
<!-- BEGIN: RIGHT COLUMN -->
<div id="ja-col2"><div id="ja-col2-top"><div id="ja-col2-bot" class="clearfix"><?php if ($hasSubnav) { ?>
<div id="ja-subnav" class="moduletable-hilite">
<h3>On this page</h3>
<?php $jamenu->genMenu (1,1); ?>
</div>
<?php } ?><jdoc:include type="modules" name="pubright" style="xhtml" />
</div></div></div>
<!-- END: RIGHT COLUMN -->
<?php } ?></div></div>
<?php
$spotlight = array ('pubuser1','pubuser2', 'pubuser6','pubuser7');
$botsl = $tmpTools->calSpotlight ($spotlight,$tmpTools->isOP()?100:99.9);
if( $botsl ) {
?>
<!-- BEGIN: BOTTOM SPOTLIGHT -->
<div id="ja-botslwrap">
<div id="ja-botsl" class="clearfix"><?php if( $this->countModules('pubuser1') ) {?>
<div class="ja-box<?php echo $botsl['pubuser1']['class']; ?>" style="width: <?php echo $botsl['pubuser1']['width']; ?>;">
<jdoc:include type="modules" name="pubuser1" style="xhtml" />
</div>
<?php } ?><?php if( $this->countModules('pubuser2') ) {?>
<div class="ja-box<?php echo $botsl['pubuser2']['class']; ?>" style="width: <?php echo $botsl['pubuser2']['width']; ?>;">
<jdoc:include type="modules" name="pubuser2" style="xhtml" />
</div>
<?php } ?><?php if( $this->countModules('pubuser6') ) {?>
<div class="ja-box<?php echo $botsl['pubuser6']['class']; ?>" style="width: <?php echo $botsl['pubuser6']['width']; ?>;">
<jdoc:include type="modules" name="pubuser6" style="xhtml" />
</div>
<?php } ?><?php if( $this->countModules('pubuser7') ) {?>
<div class="ja-box<?php echo $botsl['pubuser7']['class']; ?>" style="width: <?php echo $botsl['pubuser7']['width']; ?>;">
<jdoc:include type="modules" name="pubuser7" style="xhtml" />
</div>
<?php } ?></div></div>
<!-- END: BOTTOM SPOTLIGHT -->
<?php } ?><!-- BEGIN: FOOTER -->
<div id="ja-footerwrap">
<div id="ja-footer" class="clearfix"><jdoc:include type="modules" name="user3" />
<jdoc:include type="modules" name="footer" /></div>
</div>
<!-- END: FOOTER -->
September 5, 2008 at 2:11 am #268829can you post your url ?
so we can have a lookSherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
September 5, 2008 at 3:45 am #268848hi
maybe i miss your question, but i see that you chane position name to specuser1, but in index.php you load pubuser1, same with others
please check againSeptember 5, 2008 at 4:50 am #268862<em>@nguoiabcd 77804 wrote:</em><blockquote>hi
maybe i miss your question, but i see that you chane position name to specuser1, but in index.php you load pubuser1, same with others
please check again</blockquote>Sorry, the prefix I actually used in the xml and the and the index.php file was pub. I started out using spec just as an example, and then later decided to post the code snippet that contained the actual module code I was using. Sorry if there was any confusion.
you can view the template at http://sandbox.baliandesign.com/?tp=1
here is the the content of my XML file….
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="template">
<name>Public_Helio</name>
<creationDate>26 May 08</creationDate>
<author>JoomlArt.com</author>
<copyright>JoomlArt Design Team</copyright>
<authorEmail>webmaster@joomlart.com</authorEmail>
<authorUrl>www.joomlart.com</authorUrl>
<version>1.0</version>
<description>Public Helio - 2nd May 08 JA Template</description>
<files>
<filename>ja_templatetools_1.5.php</filename>
<filename>templateDetails.xml</filename>
<filename>css/colors/red-ie6.php</filename>
<filename>css/colors/orange-ie6.php</filename>
<filename>css/colors/green-ie6.php</filename>
<filename>css/colors/default-ie6.php</filename>
<filename>css/ie6.php</filename>
<filename>css/index.html</filename>
<filename>component.php</filename>
<filename>index.php</filename>
<filename>ja_vars_1.5.php</filename>
<filename>favicon.ico</filename>
<filename>params.ini</filename>
<filename>ja_menus/Base.class.php</filename>
<filename>ja_menus/CSSmenu.class.php</filename>
<filename>ja_menus/ja_cssmenu/ja.cssmenu.js</filename>
<filename>ja_menus/ja_cssmenu/ja.moomenu.js</filename>
<filename>ja_menus/ja_cssmenu/index.html</filename>
<filename>ja_menus/ja_cssmenu/img/index.html</filename>
<filename>ja_menus/Moomenu.class.php</filename>
<filename>ja_menus/ja_moomenu/ja.moomenu.js</filename>
<filename>ja_menus/ja_moomenu/index.html</filename>
<filename>ja_menus/ja_moomenu/img/index.html</filename>
<filename>ja_menus/Splitmenu.class.php</filename>
<filename>ja_menus/ja_splitmenu/index.html</filename>
<filename>ja_menus/ja_splitmenu/img/index.html</filename>
<filename>html/pagination.php</filename>
<filename>html/mod_banners/default.php</filename>
<filename>html/mod_banners/index.html</filename>
<filename>html/mod_login/default.php</filename>
<filename>html/mod_login/index.html</filename>
<filename>html/index.html</filename>
<filename>html/mod_footer/default.php</filename>
<filename>html/mod_footer/index.html</filename>
<filename>html/modules.php</filename>
<filename>images/fav.ico</filename>
<filename>images/grad1.gif.bk</filename>
<filename>images/icons_license.txt</filename>
<filename>images/index.html</filename>
<filename>index.html</filename>
<filename>js/ja.script.js</filename>
</files>
<images>
<filename>template_thumbnail.png</filename>
<filename>images/bub3-tr.gif</filename>
<filename>images/icon-error.gif</filename>
<filename>images/so-q.gif</filename>
<filename>images/icon-arrow.gif</filename>
<filename>images/but-bg.gif</filename>
<filename>images/indent1.png</filename>
<filename>images/indent2.png</filename>
<filename>images/box-bl.gif</filename>
<filename>images/indent3.png</filename>
<filename>images/indent4.png</filename>
<filename>images/icon-pages.gif</filename>
<filename>images/bub4-bl.gif</filename>
<filename>images/icon-author.gif</filename>
<filename>images/box-br.gif</filename>
<filename>images/icon-search.gif</filename>
<filename>images/spacer.png</filename>
<filename>images/sticky-bg.gif</filename>
<filename>images/bub4-br.gif</filename>
<filename>images/hline.gif</filename>
<filename>images/col-bot.gif</filename>
<filename>images/box-hilite-bl.gif</filename>
<filename>images/box-hilite-br.gif</filename>
<filename>images/bub2-tl.gif</filename>
<filename>images/orange/h3-bg-hilite.gif</filename>
<filename>images/orange/box-hilite-bl.gif</filename>
<filename>images/orange/box-hilite-tl.gif</filename>
<filename>images/orange/mainnav-active.gif</filename>
<filename>images/orange/box-hilite-br.gif</filename>
<filename>images/orange/box-hilite-tr.gif</filename>
<filename>images/opaque.png</filename>
<filename>images/col-top.gif</filename>
<filename>images/bub2-tr.gif</filename>
<filename>images/vline.gif</filename>
<filename>images/shadow.gif</filename>
<filename>images/dot.gif</filename>
<filename>images/bub3-bl.gif</filename>
<filename>images/sep.gif</filename>
<filename>images/green/h3-bg-hilite.gif</filename>
<filename>images/green/box-hilite-bl.gif</filename>
<filename>images/green/box-hilite-tl.gif</filename>
<filename>images/green/mainnav-active.gif</filename>
<filename>images/green/box-hilite-br.gif</filename>
<filename>images/green/box-hilite-tr.gif</filename>
<filename>images/bub3-br.gif</filename>
<filename>images/bd-deco.gif</filename>
<filename>images/icon-checklist.gif</filename>
<filename>images/h3-bg.gif</filename>
<filename>images/pathway-bg.gif</filename>
<filename>images/bub1-tl.gif</filename>
<filename>images/arrow.png</filename>
<filename>images/bd-bg.gif</filename>
<filename>images/h3-bg-hilite.gif</filename>
<filename>images/bub1-tr.gif</filename>
<filename>images/logo.png</filename>
<filename>images/icon-info.gif</filename>
<filename>images/pdf_button.png</filename>
<filename>images/box-tl.png</filename>
<filename>images/bub2-bl.gif</filename>
<filename>images/box-tr.png</filename>
<filename>images/col-center.gif</filename>
<filename>images/bub2-br.gif</filename>
<filename>images/search-bg.gif</filename>
<filename>images/arrow3.png</filename>
<filename>images/trans-bg.png</filename>
<filename>images/download-bg.gif</filename>
<filename>images/grad1.gif</filename>
<filename>images/grad2.gif</filename>
<filename>images/header-mask.png</filename>
<filename>images/logo.gif</filename>
<filename>images/ol-bg.gif</filename>
<filename>images/box-tl.gif</filename>
<filename>images/red/h3-bg-hilite.gif</filename>
<filename>images/red/box-hilite-bl.gif</filename>
<filename>images/red/box-hilite-tl.gif</filename>
<filename>images/red/mainnav-active.gif</filename>
<filename>images/red/box-hilite-br.gif</filename>
<filename>images/red/box-hilite-tr.gif</filename>
<filename>images/printbutton.png</filename>
<filename>images/icon-plus.gif</filename>
<filename>images/bub4-tl.gif</filename>
<filename>images/mainnav-hover.gif</filename>
<filename>images/box-tr.gif</filename>
<filename>images/icon-key.gif</filename>
<filename>images/icon-help.gif</filename>
<filename>images/arrow4.gif</filename>
<filename>images/mainnav-sep.gif</filename>
<filename>images/bub4-tr.gif</filename>
<filename>images/mainnav-bg.gif</filename>
<filename>images/box-hilite-tl.gif</filename>
<filename>images/bub1-bl.gif</filename>
<filename>images/bullet.gif</filename>
<filename>images/box-hilite-tr.gif</filename>
<filename>images/bub1-br.gif</filename>
<filename>images/login-bg.gif</filename>
<filename>images/icon-star.gif</filename>
<filename>images/emailbutton.png</filename>
<filename>images/box-bl.png</filename>
<filename>images/mainnav-active.gif</filename>
<filename>images/sc-q.gif</filename>
<filename>images/icon-user.gif</filename>
<filename>images/icon-tips.gif</filename>
<filename>images/h3-bg-light.gif</filename>
<filename>images/blank.png</filename>
<filename>images/wrapper-bg.gif</filename>
<filename>images/bub3-tl.gif</filename>
</images>
<css>
<filename>css/colors/red.css</filename>
<filename>css/colors/orange.css</filename>
<filename>css/colors/green.css</filename>
<filename>css/colors/default.css</filename>
<filename>css/template.css</filename>
<filename>css/typo.css</filename>
<filename>css/ja_newsmoo.css</filename>
<filename>ja_menus/ja_cssmenu/ja.cssmenu.css</filename>
<filename>ja_menus/ja_moomenu/ja.moomenu.css</filename>
<filename>ja_menus/ja_splitmenu/ja.splitmenu.css</filename>
</css>
<languages>
<language tag="en-GB">en-GB.tpl_public_helio.ini</language>
</languages>
<administration>
<languages>
<language tag="en-GB">admin/en-GB.tpl_public_helio.ini</language>
</languages>
</administration><positions>
<position>hornav</position>
<position>breadcrumbs</position>
<position>pubbanner</position>
<position>publeft</position>
<position>pubright</position>
<position>pubtop</position>
<position>pubuser1</position>
<position>pubuser2</position>
<position>pubuser3</position>
<position>pubuser4</position>
<position>pubuser5</position>
<position>pubuser6</position>
<position>pubuser7</position>
<position>pubuser8</position>
<position>pubuser9</position>
<position>footer</position>
<position>syndicate</position>
<position>debug</position>
</positions><params>
<param name="logoType" type="list" default="image" label="Logo type" description="LOGO TYPE DESCRIPTION">
<option value="image">Image</option>
<option value="text">Text</option>
</param>
<param name="logoText" type="text" default="" size="50" label="Logo text" description="LOGO TEXT DESCRIPTION" />
<param name="sloganText" type="text" default="" size="50" label="Slogan" description="SLOGAN DESCRIPTION" /><param name="ja_font" type="list" default="3" label="Font size" description="FONT SIZE DESCRIPTION">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</param><param name="ja_screen" type="list" default="950" label="Template Width" description="TEMPLATE WIDTH DESCRIPTION">
<option value="narrow">Narrow Screen</option>
<option value="wide">Wide Screen</option>
</param><param name="ja_color" type="list" default="default" label="Color Variation" description="Color variation to use">
<option value="default">Default</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="orange">Orange</option>
</param><param name="menutype" type="menu" default="mainmenu" label="Menu Type" description="MENU TYPE DESCRIPTION" />
<param name="ja_menu" type="list" default="2" label="Menu Module" description="MENU'S TYPE">
<option value="split">Split Menu</option>
<option value="css">CSS Menu</option>
<option value="moo">Moo Menu</option>
</param><param name="showComponent" type="radio" default="1" label="Show Component" description="SHOW COMPONENT DESCRIPTION">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
</params>
</install>
September 5, 2008 at 6:16 pm #268970Hi. I’ve gotten all of the module positions working except for the left column
I’n the XML file the module position is Left, but in the index.php file….
<?php if ($ja_left) { ?>
<!-- BEGIN: LEFT COLUMN -->
<div id="ja-col1">
<div class="ja-innerpad">
<jdoc:include type="modules" name="publeft" style="rounded" />
</div>
</div><br />
<!-- END: LEFT COLUMN -->
<?php } ?>I am confused by the code here. it references ja_left and ja_col1. The XML file references just “left”
How can I change the code so that I can rename the left column to publeft?Menalto FriendMenalto
- Join date:
- May 2007
- Posts:
- 4736
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 2
- Thanked:
- 531 times in 361 posts
September 6, 2008 at 11:27 am #269060You need to open up the ja.vars.1.5.php and take a look for ja_left.
[PHP]$ja_left = $this->countModules(‘left’);
$ja_right = $this->countModules(‘right’);if ( $ja_left && $ja_right ) {
$divid = ”;
} elseif ( $ja_left ) {
$divid = ‘-fr’;
} elseif ( $ja_right ) {
$divid = ‘-fl’;
} else {
$divid = ‘-f’;
}[/PHP]
Where you can change this :
[PHP]$ja_left = $this->countModules(‘left’);[/PHP]
Into
[PHP]$ja_left = $this->countModules(‘publeft’);[/PHP]1 user says Thank You to Menalto for this useful post
September 6, 2008 at 5:41 pm #269136<em>@Menalto 78063 wrote:</em><blockquote>You need to open up the ja.vars.1.5.php and take a look for ja_left.
[PHP]$ja_left = $this->countModules(‘left’);
$ja_right = $this->countModules(‘right’);if ( $ja_left && $ja_right ) {
$divid = ”;
} elseif ( $ja_left ) {
$divid = ‘-fr’;
} elseif ( $ja_right ) {
$divid = ‘-fl’;
} else {
$divid = ‘-f’;
}[/PHP]
Where you can change this :
[PHP]$ja_left = $this->countModules(‘left’);[/PHP]
Into
[PHP]$ja_left = $this->countModules(‘publeft’);[/PHP]</blockquote>Menalto you are a prince among men!
-
AuthorPosts
This topic contains 7 replies, has 4 voices, and was last updated by jimesten 16 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum