Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

8/20/2007 2:41:57 PM
NathanJones-68.209.248.222
8/16/2007 5:53:42 PM
NathanJones-68.209.248.222
8/16/2007 5:53:13 PM
NathanJones-68.209.248.222
8/16/2007 4:51:51 AM
NathanJones-68.209.248.222
8/15/2007 1:39:12 PM
NathanJones-68.209.248.222
List all versions List all versions

RSS feed for the FlexWiki namespace

Change Note Alternate CSS
.
Summary
Owner
RelatedFeatureRequests

Description

Added the capability for administrators to specify alternate style sheets and allow the users to specify which stylesheet to use. The user's choice is persisted by the use of cookies.

Configuration

The following represents the new configuration for this feature

   <AlternateStylesheets>
          <AlternateStylesheet Href="wiki.css" />
          <AlternateStylesheet Href="classic.css" Title="Lemon"/>
  </AlternateStylesheets>

If the Title attribute is missing, then an intelligent default of the filename without the extension is used. (e.g. wiki in the first case)

Changes

default.aspx.cs

The DoPage() method now emits a <div> that contains all the Style options. This <div> is hidden and has an id of 'StyleMenu'.

WikiDefault.js

Several methods to handle setting the stylesheet to use, persisting the information in cookies, and hiding and showing the StyleMenu

PageUtilities.cs

Added the additional <link> elements for the extra stylesheets. Preserved existing functionality of being able to specify a StyleSheet in the Topic as well as using the <OverrideStylesheet> entry in the flexwiki.config file.

Usage

To actually see the additional stylesheets, you need to add the following function to _NormalBorders

:StyleMenu:{ tip, command |
        with (Presentations) 
        {[
                "||{T-}", 
                Image(federation.LinkMaker.LinkToImage("images/go.gif"), command, "#"), 
                "||{+}", 
                Link("#", command, tip, "onmouseover='ShowStyleMenu(this,event);'"), 
                "||", 
                Newline
        ]}
}

You also need to add a call to the method like the following to _NormalBorders.LeftBorder

  StyleMenu("Select an alternate stylesheet","Change Style")

TODO

I think that the user experience can still use some work, but I've taken it really as far as I care to at this point. It may be desirable to make the wiki talk above be a 'first-class' citizen and add it to the Presentation library.

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics