The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Adding Module Positions
PostPosted: Wed Mar 03, 2010 1:07 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 03, 2010 12:44 pm
Posts: 3
Hi hope someone can help.

Template: siteground-j15-47
Joomla: 1.5

I am using mod_jsn_imageshow_pro on my website http://www.agileict.co.uk.

I was having issues with the module in the way that I had linked it to user3 position. It was not showing on ie7 but did on ie8 and Firefox. I had it attached the module to user3 (top menu) so it was sitting just below it which was less than ideal anyway.

Today using information from the web I have added these additional positions...

Code:
<position>user1</position>
<position>user2</position>
<position>user4</position>
<position>user5</position>
<position>user6</position>


...into the templates.php. Then I have added this code into the index.php.

Code:
                  
<!-- BEGIN: banner:user6 -->
<div id="user6">
<div class="user6-class">
<table cellspacing="0" cellpadding="0" style="width: 900px; height: 210px; text-align: center; margin: 0 auto;">
<tr><td style="text-align: center; vertical-align: middle;">
<jdoc:include type="modules" name="user6" />
<tr><td>
</table>
</div>   


I would really like it if I could have this scrolling banner at a reduce size (w480 x h150) so that it sits between the left and right menus. The reason I want to do this is that I only want the scrolling banner on the homepage and not on all the other pages. The way I have done it currently only lets me have it on all pages, otherwise I end up with a big gap where user6 is defined on all the other pages.

I have a very basic understanding of the code. I presume I need to place this code at a different position in the index.php or within a table but I am not sure how. Any help would be appreciated.

Steve


Top
 Profile  
 
PostPosted: Wed Mar 03, 2010 1:39 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Mon Jul 28, 2008 3:31 am
Posts: 69
If you wanted to keep the banner on your homepage but avoid having a gap on other pages you could wrap the section with some php code that would check to see if any modules were published on the current page and the only render the div tags for the user6 area if you had modules assigned to the area. The code would look something like this:
Code:
<?php if($this->countModules('user6')) : ?>
<!-- BEGIN: banner:user6 -->
<div id="user6">
<div class="user6-class">
<table cellspacing="0" cellpadding="0" style="width: 900px; height: 210px; text-align: center; margin: 0 auto;">
<tr><td style="text-align: center; vertical-align: middle;">
<jdoc:include type="modules" name="user6" />
<tr><td>
</table>
</div> 
<?php endif; ?>

The of course in the Module Manager page for mod_jsn_imageshow_pro you would publish the module only on the homepage.


Top
 Profile  
 
PostPosted: Wed Mar 03, 2010 1:48 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 03, 2010 12:44 pm
Posts: 3
Brilliant Michael that works well, thank you so much.

Any ideas on how I can position the banner so that it fits between the left and right columns?

Thanks again

Steve


Top
 Profile  
 
PostPosted: Thu Mar 04, 2010 1:36 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Mon Jul 28, 2008 3:31 am
Posts: 69
From what I can see of your source code it looks like the main section of your page is set up within a division with the id="maincolumn"

Somewhere within your index.php, within that maincolumn division there will be the code
Code:
<jdoc:include type="component" />
. This is the code that will generate the main article for each page.

If I understand what you want to do correctly, you need to place the code for the user6 area within the maincolumn division, and above the code for the component. So you'd have something like:
Code:
<div id="maincolumn">

<?php if($this->countModules('user6')) : ?>
<!-- BEGIN: banner:user6 -->
<div id="user6">
<div class="user6-class">
<table cellspacing="0" cellpadding="0" style="width: ....px; height: 210px; text-align: center; margin: 0 auto;">
<tr><td style="text-align: center; vertical-align: middle;">
<jdoc:include type="modules" name="user6" />
<tr><td>
</table>
</div> 
<?php endif; ?>

<jdoc:include type="component" />

</div>


You may also have other stuff within the maincolumn division which I've not considered. You'll want to change the width of the table as well.
All the best with it.


Top
 Profile  
 
PostPosted: Thu Mar 04, 2010 7:35 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Mar 03, 2010 12:44 pm
Posts: 3
Hi Micheal

Thanks again - okay I am kind of getting there now.

If you have a look now I have reduced the size of the mod_jsn_imageshow_pro to 468 x 150 but now what I want is for the Left and right (Products and Newsletters) to sit up level with the banner. I have done a mock up http://www.agileict.co.uk/downloads/mock.jpg

http://www.agileict.co.uk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 



Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group