Sewen allows "internal" links between Wiki pages. You must only tell it, how are the URLs generated.

Generate using string formatting

You must configure the wikiLink element using the the following attributes:
Name Mandatory Comment
resolveMode yes Set to Format
formatString no URL format string, where {0} placeholder gets replaced by page slug; defaults to ~/Default.aspx?page={0}


Sample configuration for string URL formatting:
<configuration>
    <!-- Register configuration section -->
    <configSections>
        <section name="altairis.sewen"
                 type="Altairis.Sewen.Configuration.SewenConfigurationSection, Altairis.Sewen.Core" />
    </configSections>
    <!-- SEWEN configuration for query string -->
    <altairis.sewen>
        <wikiLink resolveMode="Format" formatString="~/Default.aspx?page={0}" />
    </altairis.sewen>
    <!-- Rest of ASP.NET configuration -->
</configuration>
The sample web site (TestWebSite) uses this kind of URL formatting.

Generate using ASP.NET routing

You must configure the wikiLink element using the the following attributes:
Name Mandatory Comment
resolveMode yes Set to Route
routeName no Logical route name, defaults to SewenWikiPage
slugValueName no Route value name, where slug is to be stored; defaults to slug


Sample configuration for route URL generation:
<configuration>
    <!-- Register configuration section -->
    <configSections>
        <section name="altairis.sewen" 
                 type="Altairis.Sewen.Configuration.SewenConfigurationSection, Altairis.Sewen.Core" />
    </configSections>
    <!-- SEWEN configuration for routing -->
    <altairis.sewen>
        <wikiLink resolveMode="Route" 
                  routeName="SewenWikiPage"
                  slugValueName="slug" />
    </altairis.sewen>
    <!-- Rest of ASP.NET configuration -->
</configuration>

You must then create the route:
RouteTable.Routes.MapPageRoute("SewenWikiPage", "page/{slug}", "~/Sewen/Page.aspx");
The sample web application (Altairis.Sewen.WebApp) uses URL routing.

Last edited Jul 25, 2012 at 2:32 AM by altair, version 2

Comments

No comments yet.