Summary: Populates PageTextVariables by looking through a sequence of pages
Version: 2007-02-18
Maintainer: Pm
Discussion: CascadeVar-Talk

Questions answered by this recipe


    The CascadeVar() function is intended to be used as a helpful
    function to define page variables that are drawn from page
    text variables defined in specific pages.  This makes it easy 
    to create page variables that can have default values that 
    can be overridden by authors for a specific page, group, or site.

    CascadeVar() will use the pages in $CascadeVarPathFmt,
    which will look in the current page, the GroupAttributes page,
    and the site's GroupAttributes page for the value of a given 
    page variable.  If not located in any of these sources, then
    the $CascadeVar array is used.

    To use this function, simply define a page variable in $FmtPV
    that calls the CascadeVar() function with a page name and
    the name of the page text variable to be used as a cascade
    variable.  For example, to have $BannerTitle come from
    $:BannerTitle in the current page, GroupAttributes, or 
    Site.GroupAttributes, one would define:

        $FmtPV['$BannerTitle'] = 'CascadeVar($pn, "BannerTitle")';


Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also



See discussion at CascadeVar-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.