New module position?

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
AMCAD
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Thu Jun 07, 2007 2:16 pm

New module position?

Post by AMCAD » Wed Aug 01, 2007 3:16 pm

Hey guys,
Here's what I want to do. I want to have a menu that only appears on certain pages in my site, so what I need to do is create a new module position that goes at the bottom of the content area (under the text) and be able to set it so that it only appears on those pages. I know I can set that in the module manager -> module (name).

But how do I create a new module position?

Any help would be greatly appreciated!
Last edited by AMCAD on Wed Aug 01, 2007 5:01 pm, edited 1 time in total.

Lottario
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 207
Joined: Wed Jul 04, 2007 2:42 pm

Re: New module position?

Post by Lottario » Wed Aug 01, 2007 3:23 pm

First you need to add your position to the XML file.  You'll see a whole bunch already in there, just follow that example.

Next, in the index.php file, you have to add your position into the website code.

Below (since you want yours below the text), add in something like:

Code: Select all

<?php if($this->countModules('user2')) : ?>
<jdoc:include type="modules" name="user2" style="xhtml" />
<?php endif; ?>
Thats assuming there that your module position is named user2.  Its basically saying that if theres anything published to the position user2, it creates that position on the site.

If you want to be able to style your module, add a div into the code, like:

Code: Select all

<?php if($this->countModules('user2')) : ?>
<div id="example">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php endif; ?>
You can now use that div ID in the CSS file for styling your module.

AMCAD
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Thu Jun 07, 2007 2:16 pm

Re: New module position?

Post by AMCAD » Wed Aug 01, 2007 4:57 pm

Lottario wrote: First you need to add your position to the XML file.  You'll see a whole bunch already in there, just follow that example.

Next, in the index.php file, you have to add your position into the website code.

Below (since you want yours below the text), add in something like:

Code: Select all

<?php if($this->countModules('user2')) : ?>
<jdoc:include type="modules" name="user2" style="xhtml" />
<?php endif; ?>
Thats assuming there that your module position is named user2.  Its basically saying that if theres anything published to the position user2, it creates that position on the site.

If you want to be able to style your module, add a div into the code, like:

Code: Select all

<?php if($this->countModules('user2')) : ?>
<div id="example">
<jdoc:include type="modules" name="user2" style="xhtml" />
</div>
<?php endif; ?>
You can now use that div ID in the CSS file for styling your module.
Thanks! That works great!

Gergo Erdosi
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4031
Joined: Sat Nov 11, 2006 9:34 pm
Location: Hungary

Re: New module position?

Post by Gergo Erdosi » Wed Aug 01, 2007 4:59 pm

If your question is solved, could you please mark your first message in this thread as "Solved" ?
(Modify the first message and choose the Message Icon [Solved] Image).
This way the list of messages shows that the question has been solved, and other users can benefit from it.

Thanks!

KThackston
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 108
Joined: Sat Sep 06, 2008 11:31 pm

Re: New module position?

Post by KThackston » Sat Jan 10, 2009 11:13 pm

New question on same topic:

If I have a module that appears in the right column and I want to style ONLY that module and leave the rest in the right column as is, how do I code it?

This is what I have in the style sheet so far. It is only reading the first of the 2 div tags:

div.moduletable #slidewrap {
border: solid 15px #a10f15;
color:#a10f15;
font-size: 2em;
}

table.moduletable_slidewrap h3 {
padding: 0px 0px 10px 0px;
font-family: Arial, Helvetica,sans-serif;
font-size: 2em;
font-weight: bolder;
vertical-align: middle;
color: #000;
text-align: left;
width: 100%;
}

Link: http://www.utopiaspanishproperty.com/JU ... oomla_157/

Thanks for any help.


Locked

Return to “General Questions/New to Joomla! 1.5”