Upload
engage-software
View
935
Download
3
Tags:
Embed Size (px)
DESCRIPTION
With the integration of URL Master into DNN 7.1, the creation of module-specific URL providers will be a more common differentiator for DotNetNuke modules. We'll look at what it means to have amazing, customizable URLs for the dynamic content of your custom modules.
Citation preview
@DNNConDon’t forget to include #DNNCon in your tweets!
Creating URL Providers for Your Custom Extensions
Brian Dukes, Engage@BrianDukes
@DNNConDon’t forget to include #DNNCon in your tweets!
• Extension URL Provider
What It Is
@DNNConDon’t forget to include #DNNCon in your tweets!
• DNN 7.1• Advanced URL Provider
How it works – Prerequisites
@DNNConDon’t forget to include #DNNCon in your tweets!
• Just a component in a package• Optionally tied to a desktop
module• Managed through Site Settings
How it works – Install & Manage
@DNNConDon’t forget to include #DNNCon in your tweets!
• Rearrange parameters?• Remove page names?• Implement redirects?• Store derived URL path
components?
Write Your Own – Plan
@DNNConDon’t forget to include #DNNCon in your tweets!
<component type="UrlProvider"> <urlProvider> <name>My URL Extension Provider</name> <type>My.Module.Url.UrlProvider</type> <settingsControlSrc>…</settingsControlSrc> <redirectAllUrls>true</redirectAllUrls> <replaceAllUrls>true</replaceAllUrls> <rewriteAllUrls>true</rewriteAllUrls> <desktopModule>My Module</desktopModule> </urlProvider></component>
Write Your Own – Manifest
@DNNConDon’t forget to include #DNNCon in your tweets!
• IExtensionUrlProviderSettingsControl• Provider• void LoadSettings()• Dictionary<string, string>
SaveSettings()
• Validation bug
Write Your Own – Settings
@DNNConDon’t forget to include #DNNCon in your tweets!
• Override ExtensionUrlProvider (in DotNetNuke.Entities.Urls)• CheckForRedirect• ChangeFriendlyUrl• TransformFriendlyUrlToQueryString• GetProviderPortalSettings• AlwaysUseDnnPagePath• AlwaysCallForRewrite *
Write Your Own – Implement
@DNNConDon’t forget to include #DNNCon in your tweets!
• ProviderConfig• CleanNameForUrl( string, FriendlyUrlOptions)
• EnsureLeadingChar(string, string)
• EnsureNotLeadingChar( string, string)
• CreateQueryStringFromParameters( string[], int)
Write Your Own – Utilities
@DNNConDon’t forget to include #DNNCon in your tweets!
• ChangeFriendlyUrl• Make generated URLs friendlier• Called from NavigateURL, EditUrl,
etc.• Look for URL parameters, convert
them to new path
Write Your Own – Replace
@DNNConDon’t forget to include #DNNCon in your tweets!
• TransformFriendlyUrlToQueryString• Convert incoming URL to standard
query string format• May need to find matching DNN
page• Match the root, turn the rest into
regular query string
Write Your Own – Rewrite
@DNNConDon’t forget to include #DNNCon in your tweets!
• CheckForRedirect• Determine if incoming URL is in an
old format• Set new location
Write Your Own – Redirect
@DNNConDon’t forget to include #DNNCon in your tweets!
• Turn on debug mode• AUM_AllowDebugCode
• Request with HTTP__FUGDEBUG• View messages in Fiddler
Tip – Debugging
@DNNConDon’t forget to include #DNNCon in your tweets!
THANKS TO ALL OF OUR GENEROUS SPONSORS!