Members: 10,140
Threads: 38,830
Posts: 159,367
Online: 30

Newest Member: Xoote


Old 16.07.2004, 08:03   #1
imsleepy
Junior Mamber
 
Join Date: Jun 2004
Posts: 36
imsleepy is on a distinguished road
Default Modules to display on only one page

Hello,

In the Module Manager, you have the choice of what page to display particular modules on.

My problem is this. The pages you can choose from to display a module are based on menu structure.

Let's say I have a menu with
Features - Then sublinks to
Features/movies
Features/dogs
Features/radios (well you get the idea)

So I want the module to display only on the main page "Features" and that is what I choose in the Module Manager. Problem is, apparently it defaults to display the mod on all Feature/pages as well. It will however, let you display on a single features/page. It's the main section that seems to be the problem.

What can I do to change that?

Oops almost forgot... also, since the module manager is set to only give you pages that are linked on your menu as choices to display mods, how can you place a mod on a page that is not a menu link?

Thanks

Last edited by imsleepy; 17.07.2004 at 02:44.
imsleepy is offline   Reply With Quote
Sponsored Links
Old 16.07.2004, 21:40   #2
eyezberg
Professional Mamber
 
eyezberg's Avatar
 
Join Date: Apr 2004
Location: Gap / France
Posts: 859
eyezberg is an unknown quantity at this point
Default Re: Modules to display on only one page

Interesting questions.
Hope you / we get an answer ...
__________________
joe / ex Mambo ex Doc Team
Eyezberg.com
eyezberg is offline   Reply With Quote
Old 17.07.2004, 02:40   #3
imsleepy
Junior Mamber
 
Join Date: Jun 2004
Posts: 36
imsleepy is on a distinguished road
Default Re: Modules to display on only one page

Me too...

And here I thought this was an easy (dumb) question and would be pounced on.
imsleepy is offline   Reply With Quote
Old 18.07.2004, 19:32   #4
imsleepy
Junior Mamber
 
Join Date: Jun 2004
Posts: 36
imsleepy is on a distinguished road
Default Re: Modules to display on only one page

Anyone know the answer? I hope?
imsleepy is offline   Reply With Quote
Old 17.08.2004, 22:05   #5
charlestonjazz
Baby Mamber
 
Join Date: Jul 2004
Posts: 10
charlestonjazz is on a distinguished road
Default Re: Modules to display on only one page

I am having the same question/problem. I need to have modules display on specific pages that are not part of the mainmenu scheme. I can't see any way to do this.
charlestonjazz is offline   Reply With Quote
Old 08.12.2005, 14:39   #6
vajinder
Baby Mamber
 
Join Date: Dec 2005
Posts: 1
vajinder is on a distinguished road
Default Re: Modules to display on only one page

/*
Copy the following function in "/includes/frontend.php" after mosLoadModules() function.
And in the page where you want to display only one module, use "mosLoadModulesVj("top",1,$module_id)" instead of mosLoadModules() and provide $module_id in this function.
*/
////////////////////////////////
function mosLoadModulesVj( $position='left', $style=0 ,$loaderid) {
global $mosConfig_gzip, $mosConfig_absolute_path, $database, $my, $Itemid, $mosConfig_caching;

$tp = mosGetParam( $_GET, 'tp', 0 );
if ($tp) {
echo '<div style="height:50px;background-color:#eee;margin:2px;padding:10px;border:1px solid #f00;color:#700;">';
echo $position;
echo '</div>';
return;
}
$style = intval( $style );
$cache =& mosCache::getCache( 'com_content' );

require_once( $mosConfig_absolute_path . '/includes/frontend.html.php' );

$allModules =& initModules();
if (isset( $GLOBALS['_MOS_MODULES'][$position] )) {
$modules = $GLOBALS['_MOS_MODULES'][$position];
} else {
$modules = array();
}


if (count( $modules ) < 1) {
$style = 0;
}
if ($style == 1) {
echo "<table cellspacing=\"1\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n";
echo "<tr>\n";
}
$prepend = ($style == 1) ? "<td valign=\"top\">\n" : '';
$postpend = ($style == 1) ? "</td>\n" : '';

$count = 1;
foreach ($modules as $module) {
if($module->id==$loaderid)
{
$params = new mosParameters( $module->params );

echo $prepend;

if ((substr("$module->module",0,4))=="mod_") {
if ($params->get('cache') == 1 && $mosConfig_caching == 1) {
$cache->call('modules_html::module2', $module, $params, $Itemid, $style );
} else {
modules_html::module2( $module, $params, $Itemid, $style, $count );
}
} else {
if ($params->get('cache') == 1 && $mosConfig_caching == 1) {
$cache->call('modules_html::module', $module, $params, $Itemid, $style );
} else {
modules_html::module( $module, $params, $Itemid, $style );
}
}

echo $postpend;
$count++;
}
}
if ($style == 1) {
echo "</tr>\n</table>\n";
}
}
////////////////////////////////
vajinder is offline   Reply With Quote
Old 12.10.2006, 13:30   #7
DjiT
Guest
 
Posts: n/a
Default Re: Modules to display on only one page

Thanks vajinder, you're my hero !!!
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making right side modules only show up on main page? loom001 Module 'How Do I' Questions 7 24.06.2004 21:28
updated version Display News Modules -> Version 1-3 stingrey Development Announcements 0 08.06.2004 19:28
Display news in some other page and friendly url (2 problems) cripkd Mambo 4.5 'How Do I' Questions 0 07.06.2004 00:37
How to display article contents into modules? afru Module 'How Do I' Questions 2 21.05.2004 16:07
Hide left and right modules on one page woodie63 Module 'How Do I' Questions 3 10.05.2004 18:33


All times are GMT +2. The time now is 18:32.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.