Publishing certain modules only on article page?
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Sep 29, 2010 5:08 am
Re: Publishing certain modules only on article page?
Hi Thanks for the reply,
How can i customize that "xxx article should display only in pageA and yyy article should display only in pageB"?
Thanks,
IpRameshKumar.
How can i customize that "xxx article should display only in pageA and yyy article should display only in pageB"?
Thanks,
IpRameshKumar.
- Per Yngve Berg
- Joomla! Master
- Posts: 30891
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Publishing certain modules only on article page?
Make a new menu item of type Article Layout and point it to article A
Do the same with article B.
I do not see where the modules mentioned in the subject apply.
However you can assign modules to only show on specific menu items in Module manager.
Do the same with article B.
I do not see where the modules mentioned in the subject apply.
However you can assign modules to only show on specific menu items in Module manager.
-
- Joomla! Apprentice
- Posts: 19
- Joined: Wed Sep 29, 2010 5:08 am
Re: Publishing certain modules only on article page?
Yeah,
Thats Great, it works...
Thank you,
IpRameshKumar.
Thats Great, it works...
Thank you,
IpRameshKumar.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sun Jun 20, 2010 10:32 am
- Location: India
- Contact:
Re: Publishing certain modules only on article page?
how to show a module only when article is edited
Regards
Deepak Labde
Deepak Labde
- Per Yngve Berg
- Joomla! Master
- Posts: 30891
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Publishing certain modules only on article page?
You have to use Jrequest::getvar('task')
Do a search. There are many examples in this forum.
Do a search. There are many examples in this forum.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sun Jun 20, 2010 10:32 am
- Location: India
- Contact:
Re: Publishing certain modules only on article page?
i want "Indic Writer - Google Transliteration API" module to be displayed when an editor or author edit the article in front-end.
I am not good at editing the php files so if you can refer me some simple solution or topic in this forum where i can find the solution will be helpful to me.
I am not good at editing the php files so if you can refer me some simple solution or topic in this forum where i can find the solution will be helpful to me.
Regards
Deepak Labde
Deepak Labde
- Per Yngve Berg
- Joomla! Master
- Posts: 30891
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Publishing certain modules only on article page?
Code: Select all
<?php if (JRequest::getVar('task') == 'edit') { ?>
<jdoc:include type="modules" name="edit-only" style="xhtml" />
<?php } ?>
-
- Joomla! Apprentice
- Posts: 36
- Joined: Sun Jun 20, 2010 10:32 am
- Location: India
- Contact:
Re: Publishing certain modules only on article page?
i didn't understand the code, where to put module name?
Regards
Deepak Labde
Deepak Labde
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Mar 23, 2013 4:42 pm
Re: Publishing certain modules only on article page?
radiant_tech wrote:Here's the logic that checks whether an article is being viewed and displays all modules assigned to that position:
If you want module chrome to be applied you'll want to add the style="attrib_name" attribute (i.e., style="rounded").Code: Select all
<?php if( JRequest::getVar( 'view' ) == 'article' ): ?> <jdoc:include type="modules" name="your_custom_position" /> <?php endif; ?>
thanks!!! I extended the existing if-statement in the template's index.php, and it worked beautifully!!!
Code: Select all
if ($this->countModules('mainbody-bottom') > 0) {
Code: Select all
if ($this->countModules('mainbody-bottom') > 0 && (JRequest::getVar( 'view' ) == 'article'))
-
- Joomla! Fledgling
- Posts: 1
- Joined: Tue Mar 24, 2015 2:25 pm
Re: Publishing ads only on article page?
radiant_tech wrote:I'd start with creating a position that will only be used by these banner ads (don't forget to add it to your templateDetails.xml file). Then add php logic to the template index.php file that checks whether the page being displayed is an article. Further in the template, use that logic to decide whether to display the new position.
Hy
Can you please help me with the following problem: I want to add a module al all the article pages (but below them, not inside).
What should I pick in the Module's "Menu Assignment"? It doesn't render on "No pages".
Thank you!