Text/HTML 4.6.0 and Display Tokens
When playing around with DotNetNuke 4.6 I discovered a new feature that can be very
helpful yet that I have not noticed any formal discussion about on the DNN site.
Therefore I am taking the time here to give you a breif overivew of this new function.
The feature I am talking about is the support for tokens wiithin the Text/HTML module.
This new feature provides a MUCH needed enhancement to the Text/HTML Module and
is something that I think many users will find to be very helpful.
Minimum Version and Enabling
First of all this function is ONLY supported with Text/HTML version 4.06.00, this
comes packaged with DotNetNuke version 4.6.0. If you are upgrading to 4.6.0
you will want to be sure that this upgrade is installed. (It might not be
installed if you used the upgrade package). By default the support for tokens
is disabled so you will need to enable it on a per instance basis. You can
access the token processing settings via the "Settings" option from the module's
action menu, below is a screencapture of the settings available.

As you can see from the available options you are given three distinct options for
token replacement support. The default option of "no replace" will result
in a module that functions just like all previous versions of the module.
The use of ANY other setting will result in module caching and inline editing being
disabled. This is done because since tokens are used it cannot rely on the
caching to display appropriate information.
Using Tokens
Using the tokens is VERY simple you can use the tokens in your website just like
you would use them in other areas that support DNN tokens. SO for the portal
name you will use [Portal:PortalName]. You may also supply an optional format
to the token after the name of the property if you use a | character delimiter.
A great example of a format that I discovered is this.
[User:Username|Welcome {0}!]
This will render a nice welcome message for a user when they are logged in, if an
unauthenticated user visits the page the entire text will be omitted. I see
this as a MAJOR improvement with this module and something that I find hard to believe
that this was slipped in without a lot of discussion and notice! Please share
your comments below! if you have any questions please use the forums for assistance!
Posted by Mitchel on Friday, September 21, 2007
Click here to post a comment