I set up LISE and want to use a field of type Tags.
I can enter any tag I like, but how to go on from here?
Actually I expected a tag cloud that displays all and any tags that are used, and clicking a tag getting a list of all items associated to that tag.
Or should the tag field be used in a different way?
Frank
Lise - how to use tag field?
Re: Lise - how to use tag field?
Yeah , not all is well documented yet... lack of time...
{LISE<instancename> action=tagcloud} should do what you want. The templates used are from search group so template_search='templatename' should be used as a parameter. IIRC there is a sample template: TagCloud.
HTH
{LISE<instancename> action=tagcloud} should do what you want. The templates used are from search group so template_search='templatename' should be used as a parameter. IIRC there is a sample template: TagCloud.
HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Lise - how to use tag field?
Code: Select all
{LISEactueel action="tagcloud"}There is no sample template TagCloud.
If I can get this to work I'd be more than happy to write the missing documentation for the module.
Re: Lise - how to use tag field?
Apparently I forgot to include a sample template with the installation. Will add one to the next release.frankmanl wrote:There is no sample template TagCloud.
Create a new search template:
Code: Select all
{$foo=ksort($tags)}
{foreach $tags as $k => $v}
<a href="{$v}">{$k}</a>
{foreachelse}
{/foreach}frankmanl wrote:If I can get this to work I'd be more than happy to write the missing documentation for the module.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Lise - how to use tag field?
This is a good start, Jo Morg.
Still got a couple of issues:
I solved this by using {$foo=sort($tags)}.
Tags are (I suppose) displayed by their position in the array: 0 1 2 3 etc., not alphabetically.
The tagword itself is not shown. I've got a tagword EU and another nieuws. As you can see 'EU' is also part of nieuws.
Now when I click the link for tagword EU (on my testpage that would be link 0, all items of tag EU are returned, but also all items of tag nieuws.
I'll see if I can solve these items, but if you've got suggestions, please let me know.
Still got a couple of issues:
Code: Select all
Syntax error (...) on line 4 "{$foo=ksort($tags)}" PHP function 'ksort' not allowed by security settingTags are (I suppose) displayed by their position in the array: 0 1 2 3 etc., not alphabetically.
The tagword itself is not shown. I've got a tagword EU and another nieuws. As you can see 'EU' is also part of nieuws.
Now when I click the link for tagword EU (on my testpage that would be link 0, all items of tag EU are returned, but also all items of tag nieuws.
I'll see if I can solve these items, but if you've got suggestions, please let me know.
Re: Lise - how to use tag field?
Well, no. {$foo=sort($tags)} won't have the expected effect as $tags are naturally sorted by the order they are found when processing them. Quite the opposite: when using it on an associative array it "(...) assigns new keys to the elements in array. It will remove any existing keys that may have been assigned, rather than just reordering the keys*" and that's why you are getting that (odd) result.frankmanl wrote:I solved this by using {$foo=sort($tags)}.
Tags are (I suppose) displayed by their position in the array: 0 1 2 3 etc., not alphabetically.
Either remove {$foo=sort($tags)} completely, or replace it by the original {$foo=ksort($tags)} and add $config['permissive_smarty'] = 1; to the config.php file.
Note that this particular template was only tested on CMSMS 1.12, not on 2.0+, after I added the ksort to it.
I will probably add a parameter to the tag to do that in the action itself instead and remove the use the ksort on template on the next release.
* from PHP manual
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Lise - how to use tag field?
Thanks a lot, this solved it all, the tags are alright now.replace {$foo=sort($tags)} by the original {$foo=ksort($tags)} and add $config['permissive_smarty'] = 1; to the config.php file
Frank


