PowerDNN

Recently Viewed...
SnowCovered Top Sellers

Ultra Media Gallery 5.3
Ultra Media Gallery is the most popular photo gallery and media gallery module for DotNetNuke, the major purpose of this module is to allow you create unlimited pictures and medias to your gallery and organize them by albums, your albums and medias are browsed in flash interface.

Ultra Video Gallery 2.3
Ultra Video Gallery is a brother product of Ultra Media Gallery, The major purpose of this product is to provide an easy way to add videos in various formats to your website by and play them in a unique flash gallery.

Engage: Publish 5.1
Content Workflow + Versioning + Categorization + Multiple Display Options = Truly Advanced DotNetNuke Content Management (Requires DNN 4.5.1 or later)

Flex By DrNuke
The Flex skins are professionally designed, coded and packaged by a team of DotNetNuke experts. Available in 8 great colours, each with 15 banner images, 2 menu types and a choice of 3 background styles. The entire pack features a total of 2472 skins!

XMod 5.1
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.

Events Calendar and Registration 2.1.8 for DNN4.xx
One stop solution for events calendar and events registration! Demo site available for free trial.

Open-DocumentLibrary v3.0
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.

DNNMasters SEO Suite Enterprise w/Source
If you want better Search Engine ranking you need KeepAlive, URL Rewrite, Custom 404 error, Custom Redirect, Friendly URL's, Sitemap, Google Sitemap.DNNMasters SEO Suite delivers all of it and more!

Form Master 1.6 For DNN 4
Form Master 1.6 improves on the success of version 1.5 with new features in Function, and Presentation, while maintaining the Intuitive User Interface. Form Master 1.6 delivers visual form design where input fields can easily be created, modified, and moved.

Aero // 8 colors // multi-theme skin pack (v1.2)
aero is a flexible skin pack, featuring 8 incredible colors.Combine 3 background layouts, 3 widths and 6 headers to create your own, personalized site.Now also in Color Specific Packs!!
    |   Register   |   Sunday, September 07, 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   
aparna@x-cog.com   55   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

mrwebslinger@comcast.net   55   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?

avi@nukedesigners.com   55   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
Cancel   Send
DNN Modules
Data Springs DNN Modules

View Dynamic Registration 2.4 Enterprise Edition

Data Springs Module Collection (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
 
View Opt In Email V2.6 Enterprise Edition
Opt In Email V3.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: $109.99
Price: $79.99
 
View Dynamic Forms 2.2 - Enterprise Edition
Dynamic Forms 2.6 
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 give users an easy method for finding and retrieving content. Presentation Archive allows you to categorize, organize and present content within your DotNetNuke site for presentations, educational material, videos, and almost any document or co...more
List Price: $89.99
Price: $59.99
Search Engine Optimization Cloud Module for DotNetNuke

Dynamic Tags