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  [ 39 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Oct 05, 2010 2:02 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 29, 2010 5:08 am
Posts: 19
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.


Top
 Profile  
 
PostPosted: Tue Oct 05, 2010 2:24 pm 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13759
Location: Akershus, Norway
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.


Top
 Profile  
 
PostPosted: Wed Oct 06, 2010 4:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 29, 2010 5:08 am
Posts: 19
:p Yeah,
Thats Great, it works...

Thank you,
IpRameshKumar.


Top
 Profile  
 
PostPosted: Fri Aug 10, 2012 5:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 20, 2010 10:32 am
Posts: 30
Location: India
how to show a module only when article is edited

_________________
Regards
Deepak Labde


Top
 Profile  
 
PostPosted: Sat Aug 11, 2012 6:31 am 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13759
Location: Akershus, Norway
You have to use Jrequest::getvar('task')

Do a search. There are many examples in this forum.


Top
 Profile  
 
PostPosted: Sat Aug 11, 2012 7:24 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 20, 2010 10:32 am
Posts: 30
Location: India
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.

_________________
Regards
Deepak Labde


Top
 Profile  
 
PostPosted: Sat Aug 11, 2012 8:18 am 
Joomla! Master
Joomla! Master

Joined: Mon Oct 27, 2008 9:27 pm
Posts: 13759
Location: Akershus, Norway
Code:
<?php if (JRequest::getVar('task') == 'edit') { ?>
<jdoc:include type="modules" name="edit-only" style="xhtml" />
<?php } ?>


Top
 Profile  
 
PostPosted: Sat Aug 11, 2012 8:46 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 20, 2010 10:32 am
Posts: 30
Location: India
i didn't understand the code, where to put module name?

_________________
Regards
Deepak Labde


Top
 Profile  
 
PostPosted: Sat Mar 23, 2013 4:43 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sat Mar 23, 2013 4:42 pm
Posts: 1
radiant_tech wrote:
Here's the logic that checks whether an article is being viewed and displays all modules assigned to that position:

Code:
<?php if( JRequest::getVar( 'view' ) == 'article' ): ?>
    <jdoc:include type="modules" name="your_custom_position" />
<?php endif; ?>


If you want module chrome to be applied you'll want to add the style="attrib_name" attribute (i.e., style="rounded").



thanks!!! I extended the existing if-statement in the template's index.php, and it worked beautifully!!!

Code:
if ($this->countModules('mainbody-bottom') > 0) {


to:

Code:
if ($this->countModules('mainbody-bottom') > 0 && (JRequest::getVar( 'view' ) == 'article'))


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2



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