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 Saturday, September 22, 2007 at 2:33 AM

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 5: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 6: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 9: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 10: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 7: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 10: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 Saturday, September 29, 2007 at 2:12 AM

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 10: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 5:17 AM

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

By Buck on Monday, October 08, 2007 at 3: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 10: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 10: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 11: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 Monday, October 22, 2007 at 12:36 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 Monday, October 22, 2007 at 12:42 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 Monday, October 22, 2007 at 12:48 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 Monday, October 22, 2007 at 12: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 Monday, October 22, 2007 at 12:52 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 Monday, October 22, 2007 at 5: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 Friday, February 29, 2008 at 1:33 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/Default.aspx?tabid=1070&EntryID=32

By Smart-Thinker DotNetNuke Development Blog on Friday, February 29, 2008 at 1:35 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/Default.aspx?tabid=1070&EntryID=32

By Smart-Thinker DotNetNuke Development Blog on Friday, February 29, 2008 at 1:37 AM

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Friend of RedGate

www.datasprings.com - DotNetNuke ModulesICG

Click here for advertising information.

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.