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.

Text/HTML Token Settings

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
 

Comments

Cool,
In your example what is the {0}for?
Thanks.

By Avi on Friday, September 21, 2007 at 9:33 PM

Nice discovery Mitchel. Can you clarify what does the "{0}" in your example do? And do you know if there is a page where all DNN tokens are listed? Thanks, eoghano

By Eoghano on Saturday, September 22, 2007 at 12:17 AM

A list with all the Tokens can be found in the latest UDT module (release 3.4.0). In "Manage UDT" you should check the "Grid Table settings". Just beneath the filter statement is a link called "Available Tokens Help". This opens a popup screen with the whole list. Cheers, Marc

By pietje_puk100 on Saturday, September 22, 2007 at 1:03 AM

The {0} tells the token engine to put the value for that token in for that value. Thus resulting in Welcome and the users name.

By mitchel.sellers@gmail.com on Saturday, September 22, 2007 at 4:10 AM

Thanks Mitchel; this makes me want to do the upgrade now. However, could I just upgrade the html module, or is there something in the 4.6 core that is needed to pull this off?

By Terp on Saturday, September 22, 2007 at 5:19 AM

Stefan Cullman has been blogging about this on DNN.com:
http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1547/Default.aspx

By Timo Breumelhof on Sunday, September 23, 2007 at 2:07 PM

Timo,

Thanks for the link, I didn't even see it there....

By mitchel.sellers@gmail.com on Sunday, September 23, 2007 at 5:53 PM

Mitchel, have you played with this with caching turned on for the html/text module? Does it play nicely?
John.

By John on Friday, September 28, 2007 at 9:12 PM

John,

No it doesn't play well with Caching. Per the DNN team you should turn caching off. I also believe that it might turn it off itself if you have one of the options enabled.

By mitchel.sellers@gmail.com on Saturday, September 29, 2007 at 5:03 AM

I made a simple Social Bookmarking navigation with Token Replace, check it out at this new website. I used [Tab:Url] and [Tab:Title] parameters, note that i had to define urls for each page in Page Settings > Advanced Settings menu.

By Ismet Dumlupinar on Sunday, October 07, 2007 at 12:17 AM

Ismet, can you give more description how you configured Advanced settings?

By Buck on Monday, October 08, 2007 at 10:50 AM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 5:14 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 5:32 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 6:40 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 7:36 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 7:42 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 7:48 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 7:50 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Sunday, October 21, 2007 at 7:52 PM

Comments from the following blog entry: UserProfile Templating and Forum Integration, located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=26

By Smart-Thinker DotNetNuke Development Blog on Monday, October 22, 2007 at 12:58 AM

Comments from the following blog entry: Smart-Thinker Events 4.3.7 Released (Requires DNN 4.6.0 ), located at: http://www.smart-thinker.com/Home/LatestUpdates/tabid/201/ctl/ArticleView/mid/780/articleId/82/Default.aspx

By Smart-Thinker on Thursday, February 28, 2008 at 8:33 PM

Comments from the following blog entry: Smart-Thinker Events 4.3.7 Released (Requires DNN 4.6.0+) , located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=32

By Smart-Thinker DotNetNuke Development Blog on Thursday, February 28, 2008 at 8:35 PM

Comments from the following blog entry: Smart-Thinker Events 4.3.7 Released (Requires DNN 4.6.0+) , located at: http://www.smart-thinker.com/Default.aspx?tabid=1070&EntryID=32

By Smart-Thinker DotNetNuke Development Blog on Thursday, February 28, 2008 at 8:37 PM
Click here to post a comment

Donate

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content.