How do you hide a module while viewing an article in J1.5???
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
- deeman001
 - Joomla! Apprentice

 - Posts: 8
 - Joined: Wed Apr 19, 2006 8:25 pm
 - Location: Austin, Tx
 - Contact:
 
How do you hide a module while viewing an article in J1.5???
How do you hide a module while viewing an article?  in 1.0.x you could type "if (($option != 'com_content') && ($view != 'article'))" but that doesn't work in 1.5.
Any ideas?
			
									
									
						Any ideas?
- newart
 - Joomla! Enthusiast

 - Posts: 216
 - Joined: Fri Sep 02, 2005 10:06 am
 - Location: Solar system - Earth - European Union
 
Re: How to Hide Modules while Viewing Articles?
no, I need to know that trick... I hope you can find out your reply in the Coding Forum... but please post here the exact reply! Thank you very much in advance!
			
									
									
						Re: How do you hide a module while viewing an article in J1.5???
$option = JRequest::getVar('option');
$view = JRequest::getVar('view');
I didn't try it and am not sure. But try using these 2 lines before your if statement.
			
									
									$view = JRequest::getVar('view');
I didn't try it and am not sure. But try using these 2 lines before your if statement.
My Joomla! 1.5 extensions - http://joomla.ercan.us
Progress is made by lazy men looking for easier ways to do things.
						Progress is made by lazy men looking for easier ways to do things.
- deeman001
 - Joomla! Apprentice

 - Posts: 8
 - Joined: Wed Apr 19, 2006 8:25 pm
 - Location: Austin, Tx
 - Contact:
 
Re: Can You Hide Modules while Viewing Articles in j1.5?
Here is how you do it:
$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
			
									
									
						$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
- deeman001
 - Joomla! Apprentice

 - Posts: 8
 - Joined: Wed Apr 19, 2006 8:25 pm
 - Location: Austin, Tx
 - Contact:
 
Re: How do you hide a module while viewing an article in J1.5???
Pentacle,
Thanks for the help. I modified the if statement just a little and your suggestions worked.
Here is what I ended up with:
$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
Thanks for helping me out with this.
			
									
									
						Thanks for the help. I modified the if statement just a little and your suggestions worked.
Here is what I ended up with:
$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
Thanks for helping me out with this.
- deeman001
 - Joomla! Apprentice

 - Posts: 8
 - Joined: Wed Apr 19, 2006 8:25 pm
 - Location: Austin, Tx
 - Contact:
 
Re: How to Hide Modules while Viewing Articles?
newart, here is what works.
$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
This is the way to hide html when viewing an article.
			
									
									
						$view = JRequest::getVar('view');
if ($view != 'article') { ?>
[html you do not want displayed goes here]
} ?>
This is the way to hide html when viewing an article.
- newart
 - Joomla! Enthusiast

 - Posts: 216
 - Joined: Fri Sep 02, 2005 10:06 am
 - Location: Solar system - Earth - European Union
 
Re: How to Hide Modules while Viewing Articles?
wow, ok but one question, how to write the URL of that article with that particular ID?
			
									
									
						- AmyStephen
 - Joomla! Guru

 - Posts: 579
 - Joined: Wed Nov 22, 2006 3:35 pm
 - Location: Nebraska
 - Contact:
 
Re: Can You Hide Modules while Viewing Articles in j1.5?
Deeman - 
Thanks for helping answer questions (for yourself
) - but mainly THANKS for documenting your answer for others. That ROCKS!
Amy
Edit: PS - You might find Johan's Templates in Joomla! v 1.5 helpful!
			
													Thanks for helping answer questions (for yourself
) - but mainly THANKS for documenting your answer for others. That ROCKS!Amy

Edit: PS - You might find Johan's Templates in Joomla! v 1.5 helpful!
					Last edited by AmyStephen on Wed Sep 12, 2007 4:03 pm, edited 1 time in total.
									
			
									~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~ 
http://OpenSourceCommunity.org/node/1719/
						http://OpenSourceCommunity.org/node/1719/
- deeman001
 - Joomla! Apprentice

 - Posts: 8
 - Joined: Wed Apr 19, 2006 8:25 pm
 - Location: Austin, Tx
 - Contact:
 
Re: How to Hide Modules while Viewing Articles?
for my needs, this will work.  I will continue looking to see if it can be done for each article.  You could probably use the article id # or similar.
			
									
									
						- newart
 - Joomla! Enthusiast

 - Posts: 216
 - Joined: Fri Sep 02, 2005 10:06 am
 - Location: Solar system - Earth - European Union
 
Re: How to Hide Modules while Viewing Articles?
yeah but don't worry it's only a possibility and not a need for my site and so all is ok! Thanx again deeman001. bye
			
									
									
						Re: Can You Hide Modules while Viewing Articles in j1.5?
And here is another variation...saves a line of code  
[ html you do not want to display here ]
			
									
									
[ html you do not want to display here ]
If you need a helping hand, use the one at the end of your own arm. 
www.hrpr.com
						www.hrpr.com
- pe7er
 - Joomla! Enthusiast

 - Posts: 162
 - Joined: Thu Aug 18, 2005 8:55 pm
 - Location: Nijmegen, The Netherlands
 - Contact:
 
Re: Can You Hide Modules while Viewing Articles in j1.5?
MOD note @deeman001: Crossposts merged. Please do not crosspost your messages. See the Forum rules: http://forum.joomla.org/index.php/topic,65.0.html 
			
									
									Kind Regards,
Peter Martin (aka pe7er)
db8.nl - Joomla! implementation, programming, template and component development [Dutch]
>> Questions? Get help more easily with JTS-post Assistant: http://forum.joomla.org/viewtopic.php?f=428&t=272481
						Peter Martin (aka pe7er)
db8.nl - Joomla! implementation, programming, template and component development [Dutch]
>> Questions? Get help more easily with JTS-post Assistant: http://forum.joomla.org/viewtopic.php?f=428&t=272481
- newart
 - Joomla! Enthusiast

 - Posts: 216
 - Joined: Fri Sep 02, 2005 10:06 am
 - Location: Solar system - Earth - European Union
 
Re: How do you hide a module while viewing an article in J1.5???
another good trick  
			
									
									
						
