Tags-Talk

Summary: Talk page for Tags.
Maintainer: Michael Vonrueden
Users: +2 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.


I have an issue with being able to put the (:tags:) on a group footer page, to standardize the look of the navigable features of my wiki. At first, I thought I could store the tag list in a page text variable, a la:

(:Tags: tag1, tag2, tag3:)

And in the group footer, put:

(:tags {*$:Tags} :)

(:tags tag1, tag2, tag3 :)

but that does not work. Instead, I get the unexpanded variable string as a tag. I thought I might be able to do it by changing the page text variable to:

(:if false:)
:Tags: (:tags tag1, tag2, tag3:)  (:comment Alternate method of defining page text vars:)
(:ifend:)

and on the group footer, put:

{*$:Tags}

tag1, tag2, tag3

but that didn't work either!

Is there a way I can do what I want to do?

-- tamouse October 08, 2011, at 05:45 PM

Update: at least for now, I'm doing the following bit of kludgery in subject page:

(:Tags: tag1, tag2, tag3:)(:if false:)(:tags tag1, tag2, tag3:)(:ifend:)

and

'''Tags:''' (:tags {*$:Tags} :)

Tags: (:tags tag1, tag2, tag3 :)

in the group footer, and that seems to be mostly working for me, except of course I get a {*$:Tags} entry in my taglist.

-- tamouse October 12, 2011, at 12:05 PM

Hello tamouse. A great job. It was very useful to me. But ... maybe you should change this line:

(:Tags: tag1, tag2, tag3:)(:if false:)(:tags tag1, tag2, tag3:)(:ifend:)

... by this one:

(:Tags: tag1, tag2, tag3:)(:tags-hide tag1, tag2, tag3:)

And, by the way, your extra {*$:Tags} entry issue in the taglist is pretty easy to solve, just edit tags.php file, search __GenerateTagList function and change this:

        if ($tagselection[$tag] && $showselected)
        {
            $output=$output.'<span class="listtagavailable" style="font-size:'.$size.'px;font-weight:'.($value+500).'">
            <a href="'.$ScriptUrl.'?action=tags&tag='.$tag.'">'.$tag.'</a></span> ';
        } 
        else
        {
            $output=$output.'<span class="listtag" style="font-size:'.$size.'px;font-weight:'.($value+500).'">
            <a href="'.$ScriptUrl.'?action=tags&tag='.$tag.'">'.$tag.'</a></span> ';
        }
    }

... for this:

if ($tag != '{*$:Tags}') {

        if ($tagselection[$tag] && $showselected)
        {
            $output=$output.'<span class="listtagavailable" style="font-size:'.$size.'px;font-weight:'.($value+500).'">
            <a href="'.$ScriptUrl.'?action=tags&tag='.$tag.'">'.$tag.'</a></span> ';
        } 
        else
        {
            $output=$output.'<span class="listtag" style="font-size:'.$size.'px;font-weight:'.($value+500).'">
            <a href="'.$ScriptUrl.'?action=tags&tag='.$tag.'">'.$tag.'</a></span> ';
        }
    }

}

Problem solve ;)

Have a nice day.
eseval October 20, 2011, at 12:15 PM


Talk page for the Tags recipe (users).