1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>

New and powerful IceTabs module is available for Free. Check It Out

Are you satisfied with our Joomla Templates and Extensions?. Then please take the time to Write your Review !

Welcome to IceTheme Forums, Guest
Note that some parts of our Forums are hidden to guest and visible only to our Members. also you can post on all the following threads.

Optional: Placing a module ONLY in one specific article
(1 viewing) (1) Guest
Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: Optional: Placing a module ONLY in one specific article
#10424
Optional: Placing a module ONLY in one specific article 5 Months ago Karma: 0
I know this is not specific to your templates, but I thought you might be generous in providing a clue.

Let's say i want to place a cast list for a film - "Book of Eli" - in one of the left module positions within the review page of "The Book of Eli" only. I don't want it in the section - I don't want it in the category - I don't want it in the review for "Edge of Darkness." Just in the right position of one article.

Ideally, the page would have the review in the center,then the cast list, a "Buy from Amazon" bug (specific to the film), and maybe some kind of star rating using the left hand module positions. Every review article would have its own load of individualized modules.

So far, I've found out I can load modules INTO the content, but I've found no mention on how to customize the module spaces in individual article pages.

For me, the ability to do this is huge: when i code pages outside of Joomla, I use those right and left sides to pack on additional content notes. I NEED to be able to do this.

Pleasepleasepleaseplease - hand me a clue if you have one.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
perigee
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#10427
Re:Optional: Placing a module ONLY in one specific article 5 Months ago Karma: 32
This can be done two ways.
1: Check this module here if it will suit your needs:
extensions.joomla.org/extensions/access-...-access/3391/details

2: You can add some php logic to the templates index.php file to controll where to show the module:
Code:

  <?php $article_ids = array(1); ?>
<?php if($option == 'com_content' && JRequest::getString('view') == 'article' && in_array(JRequest::getInt('id'),$article_ids)):?>
<div>
<jdoc:include type="modules" name="mycustomarticlemodule" style="xhtml" />
 </div>
<?php endif; ?>



If you use the above code you need to:
1:Change the article nr in array(1) to suit your article id/id's to show this specific module on.
2:Change module name to suit your module for use.
3:Change module style to the style you want to use on it
4:Add it in the templates index.php where you want to show it.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Menalto
Developer Member
Posts: 1360
graphgraph
User Offline Click here to see the profile of this user
oopsit_v2 joomlasupport@gmail.com
Reply Quote
Need an rockstar Joomla developer on board? Send me an email, Skype me or Google Talk me if interested.I am available.
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: juljan, blerta

Join IceTheme

Are you ready to Download all our Joomla Templates and make use of them instantly on your website?
Join IceTheme Club Now!

IceSpeed Plugin

IceSpeed Plugin decrease the loading time of your website by compressing, optimizing, merging CSS and JavaScript on your website... Read More

Affiliate Program

Earn 20% of every sale that is generated from your website and generate and extra income immediately! Join Affiliate Program