Hi Wiki team,
Just wanted to let you know that we've released a Friendly Url Provider with specific module extensions capabilities.
Here's the anouncement's thread.
The default providers includes a Wiki provider.
Still the result is quite good, as you can see on our french guide.
What do you think?
The inner urls still need to be regenerated, but in the mean time, it currently illustrates the 301 redirect capabilities to override the old dnn rewrites.
Note that there was not much to do really since the wiki modules already deals with including the topic name in the url so it's just a matter of passing the Http parameter after escaping, and the provider core engine really does the job. It could have been done with a syntax rule alone, yet the provider probably makes it clearer.
Here's the rule used on our wiki page:
[${Scheme}][${RootPath}][/${Language}][/${TabPath}][/${TabName}][/${ModuleTitle}][/${WikiTopic}][/${ControlKey}][/${Params,SubPath}][.${Extension}][?${QueryString,QueryStringValue}]
Here's the code for the wiki provider:
Public Class DnnWikiUrlRewriter
Implements IUrlRewriterProvider
Public Function GetModuleRewrites() As System.Collections.Generic.List(Of GroupParamsRewrite) Implements IUrlRewriterProvider.GetRewrites
Dim toReturn As New List(Of GroupParamsRewrite)
toReturn.Add(New GroupParamsRewrite("WikiTopic", RewriteType.SubPath, UrlParam.FromSyntax("topic")))
Return toReturn
End Function
Public Function RewriteParams(ByVal groupName As String, ByVal objRewriteType As RewriteType, ByVal params As System.Collections.Generic.Dictionary(Of UrlParam, String)) As GroupRewriteResult Implements IUrlRewriterProvider.RewriteParams
Dim toReturn As New GroupRewriteResult()
If params.Count > 0 Then
Select Case groupName.ToLowerInvariant
Case "wikitopic"
toReturn.RewriteValue = StringEscaper.EscapeString(params(UrlParam.FromSyntax("topic")))
toReturn.ConsumedParameters(UrlParam.FromSyntax("topic")) = True
End Select
End If
Return toReturn
End Function
End Class