When using the ListPages module to list pages, I would like to use [[iftags ...]] as part of the module body. It should act on whether the listed page has a certain tag attached to it.
Code example:
[[module ListPages tags="cat dog"]]
[[iftags cat]]
%%title_linked%% has the tag cat
[[/iftags]]
[[iftags dog]]
%%title_linked%% has the tag dog
[[/iftags]]
[[/module]]
Test Case
The "Game works?" column doesn't show anything at all. Please look at the source code and note that there are 3 "iftags" in that column. Each page is tagged with either 1, 2, or 3.
Could you please post your request instead of explaining? I don't understand what you want/need.
Piotr Gabryjeluk
visit my blog
Sorry - I guess a simple explanation would have been better :)
I've edited the page above, please re-read it now and let me know if you're still not sure what I mean.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
leiger: iftags works inside ListPages as long as you don't use separate="false".
Piotr Gabryjeluk
visit my blog
That's ridiculous. separate="false" should be the ONLY way ListPages works. With separate="false", you can achieve amazing things (as we already do).
Please tell us why this is the case.
Edit: Oh, and if you need a “use case” for amazing things via separate="false", just look at every single application I have made for Wikidot ;-)
Okay, that clears thing up a bit. I've removed separate="false" from the test page and it works fine now.
Two questions:
If there are times that separate="false" must be used in conjunction with iftags, I'd like to ask that you remove the need to set 'separate' to true to get iftags working, as part of this wish.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
Purpose: To enclose each page item in a <div> block
When it has to be used: Never. It's flawed.
Ah, sorry. Wrong question. I meant, when is separate="false" used? (will edit my post)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
separate="false" must be used if you wish to perform:
Iftags doesn't work in ListPages separate="false" for the same reason [[image]] doesn't work straightly. Separate="false" triggers different handling of page sources.
When separate="true":
When separate="false"
Piotr Gabryjeluk
visit my blog
So simply put:
Aha, thanks. This explains a lot. Had to read through it slowly but I'm pretty sure I understand what you're saying. The main thing that is affected by the 'separate' attribute is the scope of variables (where they are relative to)…
Well, I can use iftags in the situations I wanted to now, just by removing the separate="false" syntax (thereby using the default separate="true" instead).
Thanks!
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
This is the current explanation of "separate":
I believe it should be more clear or at least point what breaks when separate="no".
Piotr Gabryjeluk
visit my blog
I think the best way to represent this is to use a table.
Based on what I can understand of your description with how this works, I've created this table — is it correct? If it is I'll gladly add it to the ListPages module documentation :)
[[image ...]]
[[iftags ...]]
[[footnote]]...[[/footnote]]
# List item
Cheers,
Shane
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
BTW, there is one easy fix to let iftags work inside ListPages with separate="no" and is similar to how to make images work. If you want images work in such a module you do the following:
(You name the page image relates to). So we could add a possibility to point page relative to iftags into its syntax:
It would be very universal though, because you could toggle things based on other page's tags.
Piotr Gabryjeluk
visit my blog
That would be awesome!
Gabrys… I can think of several cool things I could do if I could toggle things based on tags that another page has attached to them … especially once you've added the ability to toggle tags using buttons.
My users could have tag toggle buttons on their profile pages… then I could use the ListUsers module like so (a bit like the 'breadcrumb' setting idea that was being discussed just a little while ago)
(indentation added for clarity)
[!-- If the user doesn't want to see a list of members on home page, hide it from them only! --]
[[module ListUsers users="."]]
[[iftags page="profile:%%number%%" -_hide-member-list]]
[[module Members]]
[[/iftags]]
[[/module]]
I assume this would work? If yes… I'm just going to sit here drooling with anticipation…! ;-) (Wow, what a geek I am, getting so excited over a potential syntax change that a wiki farm is making… :D)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
This would work. Please add a wish :-).
Piotr Gabryjeluk
visit my blog
Already did just before I saw this ;-) http://feedback.wikidot.com/wish:285
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
'Twas national Geek day a few days ago =D
Too bad you missed it!
C'mon James, admit it. You're disappointed you missed it as well :P
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server
well… yes :(