- Posts: 11
COMMUNITY FORUM
[Problem] K2 component / item list in item error
- Patrick
-
Topic Author
- Offline
- New Member
I have a problem with a component K2 once to display the list of articles / news on the site.
I made TOP MENU to link to a specific article in K2 named "News" and in that article, this component is displayed.
www.bikebydgoszcz.pl/aktualnosci
When I enter that in any sample article
www.bikebydgoszcz.pl/aktualnosci/test-artykul-k2
As you can see above the article (headline of the article) you can see a list of articles / news
How do I turn it off to in the articles do not show it?
At the below given link. K2 component is added to an article in Joomla, not in the component K2. It's okey.
www.bikebydgoszcz.pl/team
the difference is that he changed the URL (/ somponent/k2 /)
www.bikebydgoszcz.pl/component/k2/test-artykul-k2
Attachment not found
Best regards and im waiting for quick replay.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to alter your template's index.php and exclude the position in which the module renders from items.
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Thank you for your answer. Could you explain little bit more how can i solve it ?
Should i paste here index.php my template ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You might have to alter a couple of files depending on your template.
You need some variables (look if they are already defined in your template)
Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to alter your template's index.php and exclude the position in which the module renders from items.
You can find which module position to hide from the backend. Just see in which position this module is rendered.
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
I have user2 position in my template
wklej.org/id/1063825/
I don't know where type your code... Could you help me, navigate where ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Then go to the module position you want (user 2 in this case) and change
Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Still the same ...
www.bikebydgoszcz.pl/aktualnosci/test-artykul-k2
In article i can see items list on top
wklej.org/id/1064052/
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Insert the variables $option and $view at line 29 approx. and before the closing ?> tag.
Seems you forgot that part.
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Parse error: syntax error, unexpected '$view' (T_VARIABLE) in /home/rufik/public_html/bikebydgoszcz.pl/public_html/templates/joomspirit_76/index.php on line 30
Could you prepare for me complete code becasue i don't know where i should add it...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
(See the first code snippet I posted.) Insert them before JHtml::_('behavior.framework', true);
?>
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
I see progress :)
www.bikebydgoszcz.pl/aktualnosci/kolejny-testowy-artykulik-aktualnosci
Now top items list gone inside article. Great.
BUT now when i want to see all articles on my website
www.bikebydgoszcz.pl/aktualnosci
I see nothing (this is placed ass K2 single article when i placed K2 component)
How to fix it, how to show items list ?
Below is my index.php from template
wklej.org/id/1064477/
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
This code will exclude the module from ALL items, even if they belong directly to a menu item.
I have an easier solution for this one.
Create a new module position above or right after user-2 called aktualnosci-header or something like that will help you remember the position.
Publish a module there ONLY in your homepage or where you need it to be. If you have correctly setup your menus you will not see the module anywhere else.
This way you have two module positions, one specific (aktualnosci-header) and one more generic (user-2) which will never render inside K2 items.
PS. here is the snippet as well.
Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Just by th way. Do you have skype ?
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Im trying to do ... hmm
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Because i created new module called "aktualnosci-heade" in position aktualnosci-header
www.bikebydgoszcz.pl/index.php?tp=1&template=joomspirit_76
And whats next ? It is ok ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Unfortunately we do not offer Skype support.
I can see the position. I think you got it. You now need to publish a module only in the menu items you wish for it to appear.
Please Log in or Create an account to join the conversation.
- Patrick
-
Topic Author
- Offline
- New Member
- Posts: 11
Attachment not found
Attachment not found
Attachment not found
And resoult is
www.bikebydgoszcz.pl/aktualnosci
Hmm i dont know maybe i made somewhere mistake...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
PS. I ve met a lot of Poles but my Polish is very bad to say at least, so be lenient if I got something wrong.
For what I can make of your screenshots you published a menu module on your user3 module position which had a fixed width. All these widths are produced from custom variables on your template. Notice $user3_width.
I am sure the template developer will be able to provide you with a better solution since he is the one who developed the template. Be sure to show him this thread and he will know exactly how to help you.
Please Log in or Create an account to join the conversation.