Hide/disable module in the category view but not the article

Fashion and clothing responsive Joomla ecommerce template with full VirtueMart support and advanced store features.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Oct 20, 2013 6:44 pm
Reply with quote
Report this post
Hi, I hope someone can help with this... I am trying to set up a sidebar panel using newshow gk5 to only appear inside the article but not in the blog category. I have a thumbnail layout in the category and the sidebar only spoils the look. I was wondering if there is anything else I can try.

I have been trying to find a work around all weekend and the closes I got was using this code:

Code: Select all
 <?php $view = JRequest::getVar('view', 0); ?>
<?php if ($view != "category") { ?>
<aside id="gkSidebar" class="gkOnlyOne">
<div>
<jdoc:include type="modules" name="sidebar" style="<?php echo $this->module_styles['sidebar']; ?>" />
</div>
</aside>
<?php } ?>


in the default.php file in the layout folder. And it works, but unfortunately it leaves a blank space in place of the sidebar in the section blog in this case. Any kind of advice will be hugely appreciated. I am guessing that request goes to the responsive layout and resizes the content even though the module doesn't appear on the page. I don't code myself so if anyone can help me with this I'll be very grateful.

Thank you in advance.
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 6:50 pm
Reply with quote
Report this post
Could You please post an url to your site where this blank space appears?
User avatar
Moderator

GK User
Sun Oct 20, 2013 7:21 pm
Reply with quote
Report this post
Thank you so much for taking the time to look at it!
Here is the link: http://neilarey.com/fitness.html
Once you click on the article, the sidebar shows up. It's a very simple workaround, I do hope I haven't broken anything else in there (everything seems to work ok except for the vacant space)
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 7:51 pm
Reply with quote
Report this post
Ok, I assume You know a little bit of php and css.
Using same method for detecting category, please add additional style (eg. 'fullWidth') to:
Code: Select all
<div id="gkContentWrap">

Then with use of override.css add:
Code: Select all
#gkContentWrap.fullWidth {
width: auto;
}

which will reset column width to full size.

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Sun Oct 20, 2013 8:35 pm
Reply with quote
Report this post
...well, I don't really know anything, I am just guessing and googling... I am surprised that my website is still up with everything it went through today.

So I edited and enabled override.css and I tried to guess how the gkContentWrap would look like..
I came up with something like this:
Code: Select all
 <div id="gkContentWrap"<?php $view = JRequest::getVar('view', 1); ?><?php if ($view != "category") { ?>class="FullWidth"<?php } ?>>

I seriously doubt that it's what you had in mind, it is this kind of situation:
Image
Anyway, I tried just assigning the style <div id="gkContentWrap" class="FullWidth" > to see if it would make any difference and it didn't. It's looks the same in both cases.

What is the right way of doing this? Thank you for your patience and quick response.
~ Nel
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 9:07 pm
Reply with quote
Report this post
Just worked out the if command...
<div id="gkContentWrap" <?php if (JRequest::getVar('view') == 'category'){?>class="FullWidth" <?php } ?>>
I think.
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 9:09 pm
Reply with quote
Report this post
Aaaaaaaaaah! I did it, I did it, I did it!!!!!!!!!
THANK YOU SO MUCH for your help!!!!!!!!!!!!!!!!!!!!!!!!
User avatar
Fresh Boarder

GK User
Mon Oct 21, 2013 7:07 pm
Reply with quote
Report this post
Great :). And I hope You learned more by doing it alone :)
User avatar
Moderator

GK User
Tue Oct 22, 2013 9:26 pm
Reply with quote
Report this post
:D
Image
User avatar
Fresh Boarder

GK User
Thu Oct 24, 2013 5:56 pm
Reply with quote
Report this post
:D
User avatar
Moderator


cron