Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Put module in div

Put module in div

I use this code to put a module in div and put a title before. It work for the module but in break the other divs in page
Is any way to fix this code, I want to use it becose metamod dont put modules in divs with class in my site.  thank you

Code:

?>   

<div class="modulemet">
<div class="titlte"> title </div>
     <?php return 121;     ?>   </div>
<?php

patben
Beginner Modder
ranks
useravatar
Offline
12 Posts
Administrator has disabled public posting

Re: Put module in div

Hi Patben,

hey nice try, but that's just not going to work, sorry. As soon as the "return" is done, nothing after it in the PHP code gets looked at. So MetaMod is just not able to wrap modules in extra HTML elements.

However, most modules have divs surrounding them, so you could target some CSS onto that div specifically. e.g. make the class of your title div a little more unique, then you can use:

div.moduletitle {} /* for the title itself */
div.moduletitle + div {} /* for the div following the title */

hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Re: Put module in div

Thank you is works, but it dont work with the div that in this is the title isnide.

patben
Beginner Modder
ranks
useravatar
Offline
12 Posts
Administrator has disabled public posting

Re: Put module in div

Hi Patben,

Sorry, I didn't understand what you wrote. Can you please be more specific about what does or doesn't work?

Thanks,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11529
Newest User:
jame380003
Members Online:
0
Guests Online:
200

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked