You are here: TU Delft Wiki > Research/ISO19152 Web > WebPreferences (23 Feb 2010, ArendPool )

Research/ISO19152 Web Preferences

The following settings are web preferences of the Research.ISO19152 web. These preferences overwrite the site-level preferences in DefaultPreferences and SitePreferences , and can be overwritten by user preferences (your personal topic, eg: WikiGuest in the Main web).

Web Preferences Settings

These settings override the defaults for this web only. See full list of defaults with explanation . Many of the settings below are commented out. Remove the # sign to enable a local customisation.

 #00B0F0 
  • Web-specific background color: (Pick a lighter one of the StandardColors ).
    • Set WEBBGCOLOR = #00B0F0
    • Note: This setting is automatically configured when you create a web

  • Image, URL and alternate tooltip text of web's logo.
    Note: Don't add your own local logos to the TWikiLogos topic; create your own logos topic instead.
    • #Set WEBLOGOIMG = foswiki-logo.gif
    • #Set WEBLOGOURL = https://wiki.tudelft.nl/bin/view/Main/WebHome
    • #Set WEBLOGOALT = Powered by Foswiki, The Free and Open Source Wiki

  • List this web in the SiteMap . If you want the web listed, then set SITEMAPLIST to on , do not set NOSEARCHALL, and add the "what" and "use to..." description for the site map. Use links that include the name of the web, i.e. Research/ISO19152.Topic links.
    Note: Unlike other variables, the setting of SITEMAPLIST is not inherited from parent webs. It has to be set in every web that is to be listed in the SiteMap
    • Set SITEMAPLIST = on
    • Set SITEMAPWHAT = LADM Wiki
    • Set SITEMAPUSETO = ...collaborate on Land Administration Domain Model
    • Note: Above settings are automatically configured when you create a web

  • Exclude web from a web="all" search: (Set to on for hidden webs).
    • Set NOSEARCHALL =
    • Note: This setting is automatically configured when you create a web

  • Prevent automatic linking of WikiWords and acronyms (if set to on ); link WikiWords (if empty); can be overwritten by web preferences:
    • #Set NOAUTOLINK =
    • Note: You can still use the [[...][...]] syntax to link topics if you disabled WikiWord linking. The <noautolink> ... </noautolink> syntax can be used to prevents links within a block of text.

  • Default template for new topics for this web:
    • WebTopicEditTemplate : Default template for new topics in this web. (Site-level is used if topic does not exist)
    • WebTopicEditTemplate : Site-level default topic template

  • Comma separated list of forms that can be attached to topics in this web. See TWikiForms for more information.
    • Set WEBFORMS =

  • Users or groups who are not / are allowed to view / change / rename topics in the Research/ISO19152 web: (See TWikiAccessControl ).
    • Set DENYWEBVIEW =
    • #Set ALLOWWEBVIEW =
    • #Set DENYWEBCHANGE =
    • Set ALLOWWEBCHANGE = Iso19152EditorGroup
    • #Set DENYWEBRENAME =
    • Set ALLOWWEBRENAME = Iso19152AdminGroup

  • Users or groups allowed to change or rename this WebPreferences topic: (e.g., WikiAdminGroup )
    • Set ALLOWTOPICCHANGE = Iso19152AdminGroup
    • Set ALLOWTOPICRENAME = nobody

  • Web preferences that are not allowed to be overridden by sub-web, user or topic preferences:
    • Set FINALPREFERENCES = NOSEARCHALL, ATTACHFILESIZELIMIT, WIKIWEBMASTER, WEBCOPYRIGHT, WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, DENYWEBRENAME, ALLOWWEBRENAME

Tools

  • Rename, move or delete this web

Preference Settings

A preference setting lets you define a simple macro that will be expanded in your output. A preference setting looks like this:

[multiple of 3 spaces] * [space] Set [space] MACRONAME [space] = [space] value

Example:

   * Set WEBBGCOLOR = #FFFFC0
Macros defined using preference settings are expanded by enclosing their name in percent signs. So when you write %WEBBGCOLOR% , it gets expanded to #00B0F0

A preference macro is always taken from the most current topic revision, even when accessing previous revisions of a topic.

Preferences can be defined in a number of places:
  1. DefaultPreferences (Foswiki upgrades overwrite this topic)
  2. In (some) plugin documentation topics. (Deprecated)
  3. SitePreferences
  4. In user topics, if the user has one (yours is WikiGuest )
  5. WebPreferences
  6. Sub-webs inherit the WebPreferences of their parent
  7. In the topic being accessed
In this list, Set statements which occur at numerically higher locations override macros of the same name defined at lower numbered levels, unless the macro was listed in a finalpreferences setting (finalised) at a lower-numbered level. in this case, the macro is locked to the value at that level; set statements at higher-numbered levels are ignored.

prefs-stack.jpg

IDEA! preference settings can easily be disabled with a # sign. Example:
   * #Set DENYWEBCHANGE = %USERSWEB%.UnknownUser
IDEA! You can hide preference settings in the output by enclosing them in HTML comments; for example,
<!--
   * Set HIDDEN = This will be invisible in the output
-->

If you are setting a preference and using it in the same topic, note that Foswiki reads all the preference settings from the saved version of the topic before it displays anything. This means you can use a setting anywhere in the topic, even if you set it at the very end. But beware: it also means that if you change the setting of a macro you are using in the same topic, Preview will show the wrong thing, and you must Save the topic to see it correctly.

Also note that Foswiki always reads the setting from the most current topic revision, so viewing older revisions of a topic can show unexpected results.

And especially important, preference settings are never overridden or set in "%INCLUDE{" topics. in the below example about weather conditions, note the difference in the CONDITIONS expansion

Spaces between the = sign and the value will be ignored. You can split a value over several lines by indenting following lines with spaces - as long as you don't try to use * as the first character on the following line.

Example:
   * Set MACRONAME = value starts here
     and continues here

Whatever you include in your macro will be expanded on display, exactly as if it had been entered directly (though see Parameters, below).

Example: Create a custom logo macro
  • To place a logo anywhere in a web by typing %MYLOGO% , define the preference settings in the web's WebPreferences topic, and upload a logo file, ex: mylogo.gif . You can upload by attaching the file to WebPreferences , or, to avoid clutter, to any other topic in the same web, e.g. LogoTopic . Sample preference setting in WebPreferences :
   * Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif

You can also set preference settings in a topic by clicking the link Edit topic preference settings under More topic actions . Preferences set in this manner are known as 'meta' preferences and are not visible in the topic text, but take effect nevertheless.

Parameters

Note that %CONDITIONS% expands differently when this example is viewed in Macros . This is because Set statement are not active in included topics. The including topic's set statements are used.

Macros defined using preference settings can take parameters. These are symbols passed in the call to the macro to define local macros that will be expanded in the output. For example,
   * Set CONDITIONS = According to [[System.%BASETOPIC%][%BASETOPIC%]] the %WHAT% is %STATE% today (Set in ...).
You can call this macro passing in values for WHAT and STATE . For example:
  • %CONDITIONS{WHAT="sea" STATE="choppy"}%
    • expands to %CONDITIONS{WHAT="sea" STATE="choppy"}% .

Parameter defaults

  • The special parameter name DEFAULT gets the value of any unnamed parameter in the macro call.
  • Parameter macros can accept a default parameter so that they expand to something even when a value isn't passed for them in the call.
Example:
   * Set WEATHER = It's %DEFAULT{default="raining"}%.
  • %WEATHER% expands to %WEATHER%
  • %WEATHER{"sunny"}% expands to %WEATHER{"sunny"}%
The standard formatting tokens can be used in parameters. They will be expanded immediately when the macro is instantiated.

ALERT! Note that parameters override all other macros, including system defined macros, in the expansion of the macro where they are used.

Access Control Settings

These are special types of preference settings to control access to content. AccessControl explains these security settings in detail. Parameters are not available in access control settings.

Local values for preferences

Certain topics (user, plugin, web, site and default preferences topics) have a problem; macros defined in those topics can have two meanings. For example, consider a user topic. A user may want to use a double-height edit box when they are editing their home topic - but only when editing their home topic. The rest of the time, they want to have a normal edit box. This separation is achieved using Local in place of Set in the macro definition. For example, if the user sets the following in their home topic:
   * Set EDITBOXHEIGHT = 10
   * Local EDITBOXHEIGHT = 20
Then, when they are editing any other topic, they will get a 10 high edit box. However, when they are editing their home topic they will get a 20 high edit box. Local can be used wherever a preference needs to take a different value depending on where the current operation is being performed.

Use this powerful feature with great care! %ALLVARIABLES% can be used to get a listing of the values of all macros in their evaluation order, so you can see macro scope if you get confused.

Related Topics

  • DefaultPreferences , SitePreferences - site-level preferences
  • WikiUsers - list of user topics. User topics can have optional user preferences
  • Macros - what macros are and how to use them, including a list of common macros
  • AccessControl - explains how to restrict access by users or groups
Tags
Topic attachments
I Attachment Action Size Date Who Comment
favicon.ico ico favicon.ico manage 0.3 K 20 Nov 2004 - 18:14 UnknownUser placeholder favicon
Topic revision: r17 - 23 Feb 2010 - 08:57:02 - ArendPool

WikiWeb · Lists

Reformatted page at: 2024-07-01 09:20:54