- Posts: 2
COMMUNITY FORUM
How to show module only on k2 item page only
- Muhammad Jabir
-
Topic Author
- Offline
- New Member
Less
More
11 years 11 months ago #114415
by Muhammad Jabir
How to show module only on k2 item page only was created by Muhammad Jabir
Hi ,
How to show module only on k2 item page only
Please help very urgent
thank y
How to show module only on k2 item page only
Please help very urgent
thank y
Please Log in or Create an account to join the conversation.
- Eric
-
- Offline
- Senior Member
Less
More
- Posts: 44
11 years 11 months ago - 11 years 11 months ago #114416
by Eric
i like to modify things, and make them do unintended things
Replied by Eric on topic Re: How to show module only on k2 item page only
from the modules edit screen below the "details" area, there will be called "Menu Assignment", in the "Module Assignment" drop down choose "only on the selected page" then put a check box next to the page you want it on, and remove it from any other ones that have it
if "all pages" is currently selected, choose "no pages" first to clear the check box out of all of them
if "all pages" is currently selected, choose "no pages" first to clear the check box out of all of them
i like to modify things, and make them do unintended things
Please Log in or Create an account to join the conversation.
- Muhammad Jabir
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
11 years 11 months ago #114417
by Muhammad Jabir
Replied by Muhammad Jabir on topic Re: How to show module only on k2 item page only
thanks eric
pls answer another question
How to show metamod module only on k2 item page only no display category page
pls answer another question
How to show metamod module only on k2 item page only no display category page
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 11 months ago #114418
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: How to show module only on k2 item page only
Hello Muhammad,
Please do not double post, you will not receive any sooner if you double post.
You have to look at this thread getk2.org/community/New-to-K2-Ask-here-first/178143-Problem-K2-component--item-list-in-item-error
That snippet excludes the modules from items but need something very similar to implement.
Please do not double post, you will not receive any sooner if you double post.
You have to look at this thread getk2.org/community/New-to-K2-Ask-here-first/178143-Problem-K2-component--item-list-in-item-error
That snippet excludes the modules from items but need something very similar to implement.
Log in or Create an account to join the conversation.
- Eric
-
- Offline
- Senior Member
Less
More
- Posts: 44
11 years 10 months ago - 11 years 10 months ago #114419
by Eric
i like to modify things, and make them do unintended things
Replied by Eric on topic Re: How to show module only on k2 item page only
the above post confuses me...
your asking about how to show a certain view within that module (metamod extension), not within the page right?
your asking about how to show a certain view within that module (metamod extension), not within the page right?
i like to modify things, and make them do unintended things
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 10 months ago #114420
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: How to show module only on k2 item page only
I am sorry the code should be
<?php if($option=='com_k2' && $view=='item'): ?>
Remove one set of parenthesis and the exclamation mark.
This code is for your template's index.php not for a module.
<?php if($option=='com_k2' && $view=='item'): ?>
Remove one set of parenthesis and the exclamation mark.
This code is for your template's index.php not for a module.
Please Log in or Create an account to join the conversation.
- ghandil
-
- Offline
- Junior Member
Less
More
- Posts: 31
11 years 8 months ago - 11 years 8 months ago #114421
by ghandil
Replied by ghandil on topic Re: How to show module only on k2 item page only
I want to show a module position on all pages except "item pages".
In template files it was defined if the right/left positions weren't loaded the main container will fill more space in percentage; with the class would be assigned to it :
In template files it was defined if the right/left positions weren't loaded the main container will fill more space in percentage; with the class would be assigned to it :
Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 8 months ago #114422
by Yiota
Replied by Yiota on topic Re: How to show module only on k2 item page only
You will probably have to include the ($option=='com_k2' && $view=='item') check in this function as well.
Which of the two module positions have you made the check for?
Which of the two module positions have you made the check for?
Please Log in or Create an account to join the conversation.
- ghandil
-
- Offline
- Junior Member
Less
More
- Posts: 31
11 years 8 months ago #114423
by ghandil
Replied by ghandil on topic Re: How to show module only on k2 item page only
Thanks for reply,
I have checked if right position (position-5) was not loaded (that certainly wasn't loaded on item pages), then the container gets "span9" class.
Here I posted a complete overview of what I mean :
stackoverflow.com/questions/18459720/cant-set-true-conditional-div-class-for-responsive-layout
Thank You
I have checked if right position (position-5) was not loaded (that certainly wasn't loaded on item pages), then the container gets "span9" class.
Here I posted a complete overview of what I mean :
stackoverflow.com/questions/18459720/cant-set-true-conditional-div-class-for-responsive-layout
Thank You
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 8 months ago #114424
by Yiota
Replied by Yiota on topic Re: How to show module only on k2 item page only
Try with this code snippet to not load the right position.
<?php
$com = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if($com=='com_k2' && $view!='item'): ?>
<jdoc:include type="modules" name="position-5" style="xhtml" />
<?php else: ?>
<jdoc:include type="modules" name="position-custom" style="xhtml" />
<?php endif ?>
Please Log in or Create an account to join the conversation.
- ghandil
-
- Offline
- Junior Member
Less
More
- Posts: 31
11 years 8 months ago - 11 years 8 months ago #114425
by ghandil
Replied by ghandil on topic Re: How to show module only on k2 item page only
Doesn't make changes :(
Below snippet is the content section in "index.php" of the template. "position-custom" and "position-7" are left and "position-5" is right.
Below snippet is the content section in "index.php" of the template. "position-custom" and "position-7" are left and "position-5" is right.
Log in or Create an account to join the conversation.