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
PostPosted: Fri Nov 02, 2007 10:51 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 14, 2006 3:33 pm
Posts: 52
Hi,

In the standard blog output, one can have a full article, a bunch of intros, and some links, in that order.
These three sections are all defined via templates/mytemplate/html/com_content/category/blog.php (overriding default).

What I want to do, is have a module appear between the full article and the intros, but so far the only way to include a module I've seen, is with . This just doesn't work when I use it inside blog.php.

Is there any way I can add modules within a component?

(in 1.0 I just added the mosLoadModules lines in content.php or content.html.php, and they worked fine).

_________________
--
Els
http://locusmeus.com/
http://locusoptimus.com/


Last edited by Els on Sun Jan 20, 2008 8:02 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Nov 14, 2007 2:27 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jul 05, 2007 12:56 pm
Posts: 48
use the include() function

Code:
include($mosConfig_absolute_path."/modules/mod_MODULENAME/mod_MODULENAME.php");


Top
 Profile  
 
PostPosted: Wed Nov 14, 2007 7:26 am 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 14, 2006 3:33 pm
Posts: 52
Nope, that doesn't work.
Also, even if it would include the module, it would mean absolutely no control over which moduleposition is loaded.
The module I want in that spot, is one of many positions for 'mod_mainmenu', but I surely don't want all my menus loaded in that one spot...

_________________
--
Els
http://locusmeus.com/
http://locusoptimus.com/


Top
 Profile  
 
PostPosted: Thu Jan 17, 2008 6:52 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Mon Dec 12, 2005 5:34 pm
Posts: 418
Hi,

maybe this topic contains a few answers: http://forum.joomla.org/index.php/topic,208387.0.html
it's almost the size of a tutorial about adding a custom module to the Contacts component, but the procedures are basically the same.

code examples start here http://forum.joomla.org/index.php/topic ... #msg975582
Quote:
Your best friend to fiddle with Modules is JModuleHelper and two of its methods: getModules( $position ) and renderModule( $module )
Also discussed here: http://forum.joomla.org/index.php/topic,187652.0.html


Have fun,
CirTap

_________________
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams


Top
 Profile  
 
PostPosted: Thu Jan 17, 2008 10:03 am 
Joomla! Intern
Joomla! Intern

Joined: Thu Dec 14, 2006 3:33 pm
Posts: 52
Hi CirTap,

I can't currently test it as I've had to drop the 1.5 version for the time being, but from your code examples and explanation I think it will be exactly what I needed. Good news for me, as it will likely enable me to port a current large highly customised 1.0 site over to 1.5 once it becomes the official Joomla version.

Thanks for this!  - bookmarked the thread :-)

_________________
--
Els
http://locusmeus.com/
http://locusoptimus.com/


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 5 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