![]() |
|
||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||
|
|
#1 |
|
WLC Member
Join Date: Jul 2012
Posts: 5
|
Using joomla 2.5, I would like to hide a div(class) in the Item view but show the div(class) in the Category List view. I believe that I can do that with css and php, which I am familiar with. I imagine that I can refer somehow to some kind of $this->ContainerType to see if it is an item view or category list view and then echo the class or not. Can someone point me in the direction to do this? Thanks.
MikeA |
|
|
|
|
|
#2 |
|
WLC Mod
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,134
|
How is your structure set up? How will you be able to distinguise between an item and a category?
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum. |
|
|
|
|
|
#3 |
|
WLC Member
Join Date: Jul 2012
Posts: 5
|
Distinguishing is what's holding me up. Using Firebug, I can see that the div just "higher" than the class I want to hide (a class I created which holds an Allvideos video) is called catItemIntroText. Seems Category-aware to me. But how to tell where catItemIntroText is defined? And once I find that, can I put something in there to say "always hide class X"? Or does this go in override.css? Thanks for your help. Always learning!
MikeA |
|
|
|
|
|
#4 |
|
WLC Mod
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,134
|
Apologies, but that makes very little sense to me.
Let's try this: What is the difference between the two?
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum. |
|
|
|
|
|
#5 |
|
WLC Member
Join Date: Jul 2012
Posts: 5
|
Sorry if I am not clear. It's hard to tell how much information is too little or too much.
I've created a class called vimeoclass. Then in a K2 article, I have the code Code:
<div class="vimeoclass">{vimeo}1234567{/vimeo}</div>
How do I do that? MikeA |
|
|
|
|
|
#6 |
|
WLC Mod
Join Date: Jul 2009
Location: Milky Way Galaxy
Posts: 3,134
|
So then juse use a simple CSS command:
[code] #catItemBody .viemoclass {display:hidden;} #ItemBody .viemoclass {display:visible;}
__________________
Praise be to the Lord God for the ability to learn, the capability to analyze, and the time to help users on this forum. |
|
|
|
|
|
#7 |
|
WLC Member
Join Date: Jul 2012
Posts: 5
|
Sorry, I have been away from this project for a bit.
I tried your suggestion with the number sign, but that didn't hide my class. Is that because the number sign is an ID selector, and I have many catItemBody divs on my page? I thought an ID selector works when there is only one instance of that ID on each page. |
|
|
|
|
|
#8 |
|
WLC Member
Join Date: Jul 2012
Posts: 5
|
Figured it out. I added this to my override.css:
Code:
div.catItemIntroText .vimeoclass {display:none;}
div.ItemBody .vimeoclass {display:visible;}
Al |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
Linear Mode |
|
|