Keyword

Loading module through category.php template

  • Justin Thomas
  • Justin Thomas's Avatar Topic Author
  • Offline
  • Senior Member
More
12 years 4 months ago #65976 by Justin Thomas
Loading module through category.php template was created by Justin Thomas
I am working on a re-write of a customer site using K2, SIGPro, AllVideos and K2mart (talk about the complete solution!). One of things that I would like to do is include the items on the category.php page in a module.

I have worked out a, seemingly, elegant solution to allow me to generate a {loadposition xxx} call for each category from the template.
{loadposition <?php echo $this->category->alias; ?>}

This allows for each category to call a separate instance of a module. In this site I will use a tool like BT Content Slider or SOT K2 Simple Slider to display the items in the category.

Using the code above I can see the {loadposition "aliasname"} being rendered into my page, but it won't evoke the loadposition for the module. A little reading and I realise this is because this is not in the content. So, can anybody recommend another way of using this method to load a module in my chosen template position allowing for a different module to be called for each category, WITHOUT suggesting a separate template of each category.

Looking forward to any suggested solutions.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum