Customized text in PagesByTag
6
votes
Customized text in PagesByTag
I would like to be able to customize my text that precedes the chosen tag in a Tag Cloud. I mean, to change this:
List of pages tagged with ТАГ
to
Списак страница са тагом ТАГ, or whatever someone wants to write, in any language, or any alphabet.
I suggest something like
[[module PagesByTag text="Списак страница са тагом ТАГ";]]
page revision: 4, last edited: 06 Apr 2011 22:10

25
Is this the same as 3D tag cloud for other alphabets ?
I'll try to get that done as soon as I can, by the way…
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
No it isn't. See here: http://community.wikidot.com/system:page-tags/tag/admin
It is the English text "List of paged tagged with" on that page that Brunhilda is complaining about. That text is not in the flash widget, but is created by the TagCloud module.
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
That is the PagesByTag module.
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
I've just re-created the PagesByTag module using ListPages - so you can easily add a different language in there, if using my code.
http://sandbox.wikidot.com/custom:page-tags/tags/tag2
http://sandbox.wikidot.com/custom:page-tags/tags/blog
http://sandbox.wikidot.com/custom:page-tags/tags/content
And the code is:
[[div style="float:right; width: 50%;"]]
[[module TagCloud limit="600" target="system:page-tags"]]
[[/div]]
[[module ListPages category="@URL|*" tags="@URL" limit="1"]]
++ List of pages tagged with __%%tags%%__:
[[/module]]
[[module ListPages category="@URL|*" tags="@URL" perPage="250" separate="no"]]
%%title_linked%%
[[/module]]
The blue part above replaces the blue part shown below:
[[div style="float:right; width: 50%;"]]
[[module TagCloud limit="600" target="system:page-tags"]]
[[/div]]
[[module PagesByTag]]
Just put that into your system:page-tags page and edit the text to whatever you want ;-)
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Only works if the first page found has only one tag.
It can be done with an [[include]], but probably not without.
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
Ah yes, you're right.
I'm intrigued though - how do I solve this problem with an include? I can't think of how to do it.
Cheers,
Shane
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
You're right. You can't get the tag and category from the URL into an include variable.
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
I would suggest removing the text from the module completely and putting in on a page. The problem is with the all the existing pages ;-).
Piotr Gabryjeluk
visit my blog
Also you can use ListPages with tag="@URL" as your system:tags, the problem is you can't set text for "No pages with given tags are present".
Piotr Gabryjeluk
visit my blog
Just posted some code above.
As for setting that text, I'm pretty sure that is possible. Something that Erich Steinboeck came up with a while ago I think. I'll have a look on the community site for the tutorial…
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Here it is Gabrys: http://community.wikidot.com/howto:listpages-automatic-header
When there are no results, "No pages are tagged with the selected tag" is displayed.
This is done like this:
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Hm, I really don‘t get what I should put to get this. Isn’t it much easier to fulfil my wish? :)
I tried Shane's code and I don't like it. Apart from that the text stays in English, it shows all the tagged pages when no tag is selected.
And this last one, I don't know where I should put it.
Vir bonus miser vocari, at esse non potest miser.
It replaces [[module PagesByTag]] like the other one did, and in both versions, the text is in that code; you only have to translate it yourself when you type it in.
Neither of the suggestions is perfect. The title of Shane's shows multiple tags sometimes, and Eric's doesn't have the name of the tag in it. Eric's is better since you can translate both the normal heading and the message when there are no pages to list.
I would classify them as work-arounds, rather than as fixes. Your wish is still the only way to fix the problem.
Copyright waived on Wikidot official and community sites — see profile for details.
Website: www.soronlin.org.uk
Diaspora*: ku.em.ecatstam.dop|nilnoros#ku.em.ecatstam.dop|nilnoros
That's because I don't understand Serbian, let alone trying to write it! ;-)
When no tags are selected, it should be showing no pages… that's how I designed it to work. I'll have another look at it…
Shane Smith ★ Website: Wikidot Development & Programming. ★ STE Wikidot Editor: Windows. Mac. Linux. ★ Twitter. Google+.
Thanks, rurwin. I think I'll wait for the approval of this wish… :)
Vir bonus miser vocari, at esse non potest miser.
:) Excuses, excuses… :P
Try to take all my code from that page, maybe it would help…
Vir bonus miser vocari, at esse non potest miser.
This should work:
~ Kenneth Tsang (曾勁驊), 15 years and counting…
kTsang.tk - view my blog, watch my videos, see my pictures :D
Wikidot Mobile Editor | @tsangk Twitter | EziWebs - Wikidot… but not really
No it doesn't.
http://www.srpskijezickiatelje.com/system:page-tags
Click to any tag, and you'll see. Nothing happens.
Vir bonus miser vocari, at esse non potest miser.
Hm, now I see there are some parameters that are unnecessary…
Like this:
tag="@URL|makesurethatthistagdoesnotexist" category="blog" limit="10"
What do I have to put instead of this makesurethatthistagdoesnotexist? And why the category is blog, when I don't have blog at all? Also, why limit to 10?
I'll remove all this and get back. The only thing that I don't know what to do with is this tag parameter. What do I put there?
Vir bonus miser vocari, at esse non potest miser.
No, this doesn't work at all. Now that I removed category and limit, and also this makesureblabla… that I don't know what's for there, it shows all the pages with all tags that exist. And although there is separate="false", it is separated…
Na… I think that much easier is to vote for this wish and wait to be fulfilled… :)
Vir bonus miser vocari, at esse non potest miser.