This question about Topic Markup Language and applications: Answered

New topics with same names

There are three groups of users. How can I create three topics in the menu "Webs" (such as "Main") with the same name "HomePage", and the members of each group saw only his theme? Ie In fact it was:

Webs
HomePageUserGroup1
HomePageUserGroup2
HomePageUserGroup3
Main
Sandbox
Support
System

But the members of each group have only seen their "HomePage" named "HomePage" (not HomePageUserGroup1, HomePageUserGroup2, HomePageUserGroup3):

Webs
HomePage
Main
Sandbox
Support
System

And is it possible to create such topics menu using the web management (don't use console and command line (copy _default))?

-- ArtyomShymanovski - 09 Mar 2013

You could use the IF statement, as explained in http://foswiki.org/System/IfStatements

For example, something like this might help:
%IF{"$USERNAME ingroup 'UserGroup1'" then="[[HomePageUserGroup1][HomePage]]"}%
%IF{"$USERNAME ingroup 'UserGroup2'" then="[[HomePageUserGroup2][HomePage]]"}%
%IF{"$USERNAME ingroup 'UserGroup3'" then="[[HomePageUserGroup3][HomePage]]"}%

-- FlorianSchlichting - 09 Mar 2013

Where should I write this IF statement?

-- ArtyomShymanovski - 10 Mar 2013

I created 3 topics in main menu(copy /data/_default ->

/data/HomePageAccountants

/data/HomePageManagers

/data/HomePageSecretaries

I have System/WebLeftBarWebsList.txt:
%META:TOPICINFO{author="ProjectContributor" date="1252892754" format="1.1" version="1"}%
 * *%MAKETEXT{"Webs"}%*
WEBLIST{" * <span style=\"white-space:nowrap\"><a href=\"%SCRIPTURLPATH{"view"}%/$name/%HOMETOPIC%\"><img src=\"%ICONURL{web-bg}%\" border=\"0\" alt=\"\" width=\"16\" height=\"16\" style=\"background-color:%$markerVAR{\"WEBBGCOLOR\" web=$qname}$marker%\" />&nbsp;<nop>$indentedname</a></span>"}%

Where i must insert
%IF{"$USERNAME ingroup 'AccountantsGroup'" then="[[HomePageAccountants][HomePage]]"}%
%IF{"$USERNAME ingroup 'ManagersGroup'" then="[[HomePageManagers][HomePage]]"}%
%IF{"$USERNAME ingroup 'SecretariesGroup'" then="[[HomePageSecretaries][HomePage]]"}%

???


If you wanted to follow the approach FlorianSchlichting outlined above, you might put those three IF statements prior to your WEBLIST tag and then exclude that web from the web list (using webs attribute in VarWEBLIST tag). You might also consider using FlexWebListPlugin to provide more control over which webs to include in the list.

A completely different (and i think simpler) approach might be to have a single WebHome topic in that web but use IF statements within that page to INCLUDE either the separate topics or hidden sections for the three different groups.

-- LynnwoodBrown - 27 Mar 2013

 

QuestionForm edit

Subject Topic Markup Language and applications
Extension
Version Foswiki 1.1.7
Status Answered
Related Topics
Topic revision: r5 - 27 Mar 2013, LynnwoodBrown
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy