VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: ksfbjoern on June 03, 2013, 19:39:24 PM

Title: Load modules into template-files (category)
Post by: ksfbjoern on June 03, 2013, 19:39:24 PM
hello,

i have a little problem to load modules directly into virtuemart template-files. In my example i want to load a module into the category-template.
A module is assigned to the position "referenzen_brosch".
I have tried the following code:
<?php if (JRequest::getVar('view')=='category') { ?>
<div id="catmod"><jdoc:include type="modules" name="referenzen_brosch" /></div>
<?php ?>


The result:
<div id="catmod">
<jdoc:include name="referenzen_brosch" type="modules"></jdoc:include>
</div>


As you can see the module is not loaded, but i think the position is loaded correctly?

Has somebody an ideo or an solution?

Thank's a lot

Greeting
Title: Re: Load modules into template-files (category)
Post by: balai on June 04, 2013, 09:42:40 AM
Where are you applying this code?
Modules positions can be added only in the index.php of your template.

Did you checked the loadModule content plugin?
Title: Re: Load modules into template-files (category)
Post by: ksfbjoern on June 04, 2013, 10:27:40 AM
I got the code from this site http://www.kaizenmediaworks.com/virtuemart-template-and-module-control (http://www.kaizenmediaworks.com/virtuemart-template-and-module-control).
But thanks for your answer, that is the soultion. I have to put the code into the index.php and not the template-file of virtuemart... .

Thanks!