NSP GK4 - show module only on k2 item page

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Jun 26, 2013 2:38 pm
Hi,

I'm using Joomla 2.5.11 + K2 v2.6.6 + GK template Bikestore.

I wish to display NSP GK4 module only on K2 items not on the category view.

My main link menu point on a K2 category list view, not on a particular item.
In the module option 'menu assignment', we do not have option to display a module only on k2 items of the k2 category.

Searching on k2.org forum, someone give this solution :

1-find in your template's index.php if these lines exists
Code: Select all
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');


2-Insert following code
Code: Select all
<?php if($option=='com_k2' && $view=='item'): ?>
// enter your module position here.
<?php endif; ?>



As GK template Bikestore use Gavern framework, the index.php file of the template is not as usual.
So, i'm totally lost, where could i control the module display in Gavern Framework?

Is some one have an other idea?

Thanks
User avatar
Fresh Boarder

teitbite
Wed Jun 26, 2013 3:11 pm
Hi

In our templates the standard code other joomla clubs put into index.php can be found at /layout/default.php , but there is a simplier and less invasive method. If You want to hide module in category view, than just add this code anywhere to /html/com_k2/default/category.php

Code: Select all
<style type="text/css">
[selector of a position module is in] { display: none; }
</style>
User avatar
Moderator

GK User
Wed Jun 26, 2013 4:24 pm
Very very smart,
it works great.

Your solution in my case is
Code: Select all
<style type="text/css">
#gkMainbodyBottom { display: none; }
</style>


it is always better to ask someone who knows what to look for hours.

Thank you, thank you very much
User avatar
Fresh Boarder

teitbite
Fri Jun 28, 2013 5:57 pm
Hi

No problem, glad I could help.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.