- Posts: 18
COMMUNITY FORUM
k2 tools tag
- claudio
-
Topic Author
- Offline
- New Member
I have some categories
cat1
-cat1_A
-cat1_B
cat2
-cat2_A
-cat2_B
In my module settings I selected just cat1, cat1_A and cat1_B
in my tag cloud I see my tags... ok
but If I click on a tag in article list for the selected tag i see also articles from cat2 and sons.
I'm doing something wrong?
thanks
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The options you changed are only for the module, they do not affect the tag item listings.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
What can I do to obtain an item listing only for categories selected in that tag module?
thank you
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You could set a querystring with the name of the category or some other value from the module's parameters ($param) at the link.
Then using PHP's GET - php.net/manual/en/reserved.variables.get.php you can read this variable and on your template exclude some items.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
I have to modify ...doing an override of
root/module/mod_k2_tools/tmpl/tags.php
and
root/components/com_k2/views/itemlist/tmpl/tag.php
but ...how modify it to my situation?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
override is not a problem.
my problem is about the code I have to create to obtain my itemlist filtered by categories used in tag cloud
thanks
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
Can you help me to create this custom implementation?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
mdodule: I think I have to send categories of every tag? it's correct?
this is the link from k2 tools tags.php
<a href="<?php echo $tag->link; ?>" style="font-size:<?php echo $tag->size; ?>%" title="<?php echo $tag->count.' '.JText::_('K2_ITEMS_TAGGED_WITH').' '.K2HelperUtilities::cleanHtml($tag->tag); ?>">
<?php echo $tag->tag; ?>
</a>
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
<a href="<?php echo $tag->link; ?>
<a href="<?php echo $tag->link; ?><?php if($params->get('moduleclass_sfx')) echo ' ?category='.$params->get('moduleclass_sfx'); ?>
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
I've changed my href like you wrote.
in generated url I don't see the "category" variable... it'correct?
I see this url:
index.php?option=com_k2&view=itemlist&task=tag&tag=2014&Itemid=955
if I delete the "if" and write this href
href="<?php echo $tag->link; ?><?php echo '&category='.$params->get('moduleclass_sfx'); ?>"
index.php?option=com_k2&view=itemlist&task=tag&tag=2014&Itemid=955&category=
with "category" empty
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
...where?
in mod_k2_tools.php ?
...sorry for my ignorance :(
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The module suffix setting is located in the module's settings.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
...class suffix? I think not...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to insert the category from there.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
here is the screenshot of my k2tools module... what I have to insert in "Module Class suffix"(the red input) ?
In Tag cloud settings you can see selected categories
http://imgur.com/yi42lXh
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- claudio
-
Topic Author
- Offline
- New Member
- Posts: 18
/index.php?option=com_k2&view=itemlist&task=tag&tag=2015&Itemid=955&category=133,139,132
now in
/components/com_k2/views/itemlist/tmpl/tag.php
i've to do an if GET category show items of the selected categories ... or something similar...right?
if you can help me for this last code... i'm ok... you are great.
thank's for your help
Please Log in or Create an account to join the conversation.