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.

 

more than one metamod on a page - 2 different positions

more than one metamod on a page - 2 different positions

Hi.
total newb here... sorry.

I'm trying to put two metamod modules on a page - one in user 2 and one in user 3 - but they are getting combined (weirdly too...)

Is there a way to have two metamods on a page in 2 different module positions? (I did buy the pro version)
thanks

UPDATE

ok - so I tried to combine them - one module - full width of page... with the following...

Code:

?>

<div style="width: 100%; float: left;">
    <div style="width: 45%; padding: 5px; float: left;">
        <div class="frontpagemodule"><div class="frontpage-title"><img src="images/stories/icons/news.png" width="50" height="50" style="float:left;">   News
             <div class="viewall"><a href="index.php?option=com_content&view=article&id=95&Itemid=57">View All</a></div>
         </div>
        <div style="clear:both;"></div>
        <div class="frontpage-text"><?php return 19; ?></div>
      </div>
    <div style="width: 45%; padding: 5px; float: right;">
        <div class="frontpagemodule"><div class="frontpage-title"><img src="images/stories/icons/calendar.png" width="50" height="50" style="float:left;">   Events
             <div class="viewall"><a href="index.php?option=com_content&view=article&id=95&Itemid=57">View All</a></div>
         </div>
        <div style="clear:both;"></div>
        <div class="frontpage-text"><?php return 53; ?></div>
      </div>
</div>

someone please help smile

Edited By: rodsdesign
19-Jan-11 01:41:19

rodsdesign
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: more than one metamod on a page - 2 different positions

Hi rodsdesign,

The problem is that MetaMod doesn't work like that...

Although MetaMod does allow you to insert plain HTML like you are doing there, it does not allow you to insert modules into various parts of that html by doing "return" statements dotted throughout.

When you do a return statement, it actually terminates the PHP block in MetaMod immediately, then appends the module to the HTML that was already output.

The way you are doing things here, it looks as if the majority of the HTML you are putting there just belongs in the template itself. I'd suggest that you have a look at how module positions are placed into the template, and use that technique instead.

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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10772
Newest User:
alton29318
Members Online:
0
Guests Online:
225

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