PowerDNN

Recently Viewed...
SnowCovered Top Sellers

Version 5 of the perennial best-selling tool for creating data-based solutions in DNN without custom programming. This version focuses on greater flexibility, expandability, and ease-of-use.

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts.

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

The Catalyst skins are professionally designed, coded and packaged by a team of DotNetNuke experts. The skins are available in 12 great colours. This skin is easily customisable with our unique DrNuke EasyMod technology. Try our demo!

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

    |   Register   |   Thursday, November 20, 2008   
You are here:Resources  Articles & Information  DNN Text/HTML Token Replacement Options  


DNN Text/HTML Token Replacement Options

DNN Text/HTML Replacement Tokens Options



Starting with DotNetNuke version 4.6.0 a new feature was added to the Text/HTML module that allows you to use replacement tokens inside your content. This is something that many people do not even notice and was not highly publicized at the release of 4.6.0. This article will first of all show you the different settings available and the differences between them, then it will show you how the tokens can be used, and to finish up a quick discussion on performance implications will be completed as well.


The Settings


Below are the settings made available via the “Settings” option for all instances of the Text/HTML module.




The default option is “no Replace”, this option provides a Text/HTML module that functions just like all other instances of the module had functioned before. Limited replace provides you with just a few replacement options, and is great if you simply want to inject the portal name, date or time. Lastly enhanced replace will allow you to customize content based on other objects such as the user information or module information.


For tokens to be replaced you must select an option other than “no Replace” in the settings. The downfalls of using token replacement will be discussed in detail at the end of this article


Using the Tokens



Using the tokens is very easy and follows the standard token schema used elsewhere in DotNetNuke. A token is defined inside a set of [] characters, for example to display the portal name you would use [Portal:PortalName]. This is great for those easy to remember tokens, but one item that many people request is a listing of all tokens. This is not something that is provided by the Text/HTML module, however the UDT module has a listing. Below is a copy of that listing for your reference.



Token

Description

[Portal:Currency]

Currency String

[Portal:Description]

Portal Description

[Portal:Email]

Portal Admin Email

[Portal:FooterText]

Portal Copyright Text

[Portal:HomeDirectory]

Portal (relative) Path of Home Directory

[Portal:LogoFile]

Portal Path to Logo file

[Portal:PortalName]

Portal Name

[Portal:PortalAlias]

Portal URL

[Portal:TimeZoneOffset]

Difference in minutes between Portal default time and UTC

 

 

[User:DisplayName]

User’s Display Name

[User:Email]

User’s Email Address

[User:FirstName]

User’s First Name

[User:FullName]

[deprecated]

[User:LastName]

User’s Last Name

[User:Username]

User’s Login User Name

 

 

[Membership:Approved]

Is User Approved?

[Membership:CreatedDate]

User Signup Date

[Membership:IsOnline]

Is User Currently Online?

 

 

[Profile:<Property>]

Use any default or custom Property defined for user profiles as listed in Profile Property Definition section of Manage User Accounts. Please use non-localized Property titles only.

 

 

[Tab:Description]

Page Description Text for Search Engine

[Tab:EndDate]

Page Display Until Date

[Tab:FullUrl]

Page Full URL

[Tab:IconFile]

Page Relative Path to Icon file

[Tab:KeyWords]

Page Keywords for Search Engine

[Tab:PageHeadText]

Page Header Text

[Tab:StartDate]

Page Display from Date

[Tab:TabName]

Page Name

[Tab:TabPath]

Page Relative Path

[Tab:Title]

Page Title (Window Title)

[Tab:URL]

Page URL

 

 

[Module:Description]

Module Definition Description

[Module:EndDate]

Module Display Until Date

[Module:Footer]

Module Footer Text

[Module:FriendlyName]

Module Definition Name

[Module:Header]

Module Header Text

[Module:HelpUrl]

Module Help URL

[Module:IconFile]

Module Path to Icon File

[Module:ModuleTitle]

Module Title

[Module:PaneName]

Module Name of Pane where UDT resides

[Module:StartDate]

Module Display from Date

 

 

[DateTime:Now]

Current Date and Time

[Ticks:Now]

CPU Tick Count for Current Second

[Ticks:Today]

CPU Tick Count since Midnight

[Ticks:TicksPerDay]

CPU Ticks per Day (for calculations)



You can use any combination of these tokens to provide your new display. For example if I want to display text welcoming a user to the site and letting them know the current date and time. I would use enhanced replacement and when editing the text I would have the following text.





When logged in as a host user I would see the following text





Using this example you can see how you can create dynamic content that will customize messages for users or different portals with ease.



Downfalls to Using Replacement Tokens



As with most things there is always a down side to a positive item, there is no exception when talking about replacement tokens inside the Text/HTML module. Even though the tokens are a great feature they do have two major downfalls. The first is that when using tokens inline editing is disabled. For most users this is not an issue, you simply have to use the “Edit Text” link to edit the content of the module.

The other downfall of token replacement is that if enabled ALL caching for the module is disabled, this means that each page request will result in a direct query to the database, parsing of the text, and then display. By default Text/HTML content is cached for 20 minutes, if you enabled token replacement every request will generate the content new. In smaller sites this is not an issue, but in high activity sites, this additional database and server traffic can have an effect on site performance, therefore it is cautioned that you should ONLY enable this functionality when it is needed.

This should serve as a good overview on how replacement tokens and the Text/HTML module work. You will need to experiment with the token listing to truly experience the flexibility that you can have with token replacement.

Records per Page
Page 1 of 1First   Previous   Next   Last   
         9/2/2008 4:52:41 AM
Registration Token Is there any token for user registration link as I want to display from htmltext module

         7/22/2008 9:53:12 AM
More Tokens I know that [Token:TabID] also works. I was also wondering if this could be incorporated into a skin object?

         6/18/2008 2:40:09 AM
user id Hi, Thanks for that info, i think I couldn''t find [ User:UserId ] which is quite an important one. I use it a lot.

Feedback





Enter the code shown above in the box below
Send

 
DNN Modules
Data Springs DNN Modules

View Dynamic Registration 2.4 Enterprise Edition

Just released Nov 08!

Data Springs Module Collection 2.0 (20 + Modules!)

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.....more

List Price: $479.99
Price: $349.99
 
View Dynamic Registration 2.4 Enterprise Edition

Dynamic Registration 3.2 

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options.........more

List Price: $159.99
Price: $139.99
 
Opt In Email
Opt In Email V4.0
'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur ...more
List Price: $159.99
Price: $135.00
 
View Dynamic Forms 2.2 - Enterprise Edition
Dynamic Forms 2.7 
In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts. ...more
List Price: $129.99
Price: $119.99
 
View Tailored Text v2.0 Enterprise Edition
Tailored Text v2.0 
Personalization allows you to go the extra mile in communicating or connecting one to one with your clients. When it comes to technology and web site content, you now have the power to leverage this personalization directly with your users on your DotNetNuke site. ...more
List Price: $79.99
Price: $59.99
 
 
View Dynamic User Directory v2.0 Enterprise Edition
Dynamic User Directory v2.4
The perfect compliment for extending your portals users and community! An essential ingredient for managing dynamic user information, is being able to sort key fields and create useful user directories and custom report information. ...more
List Price: $129.99
Price: $119.99
 
View Stock Quote - Enterprise Edition
Stock Quote 1.2 
Giving your site visitors relevant information is critical. With the Data Springs Stock Module you can provide your users with up to date financial information....more
List Price: $139.99
Price: $109.99
 
View Presentation Archive 1.0 Enterprise Edition
Presentation Archive  
With so much content on your web site, its important to