Buck Anderson - DNN Professor Member Login
February 08, 2012

Article Search  
Article Index

Click to grab the RSS feed for the DNN Professor Article IndexDotNetNuke Tutorials and Articles

We cover a lot of different DNN topics on this site - this article index gives you a pretty good idea of the DotNetNuke tutorials, XMod tutorials, DNN training, DNN hosting, and Internet Marketing subjects we cover for beginners and advanced DotNetNuke users.

The following is a complete index of all articles on this site - presented in the most current to oldest article sequence. You can view categories and search the index by subject.

Check back often for new articles, tips on our Business Directory, or have articles conveniently delivered to your favorite program by clicking the RSS feed icon above.


Share    
30
Make It Hot with the FatGeorge Custom Template Tags Add-on for XMod

The Custom Template Tag collection includes the following tags:

IsOnline

Parameters:UserName = string

Simply pass a username to check if that user is online (uses the standard DNN UsersOnline functionality).
If the user IsOnline then whatever content you have specified is displayed.
e.g. Display if the owner (person who added record) of a profile IsOnline.

IsNotOnline

 Parameters:UserName=string

Simply pass a username to check if that user is Not online (uses the standard DNN UsersOnline functionality).
If the user IsNotOnline then whatever content you have specified is displayed.
e.g. Display if the owner (person who added record) of a profile IsNotOnline.

This functionallity would be very useful in a forum or private messaging application built with XMod.

IfInRoles

Parameters: UserName = string, Roles = comma delimited list of DNN role names
    
If the specified user is in one of the specified roles then your content is displayed.
e.g. Check if a user is a member of a particular role(s)

IfNotInRoles

Parameters: UserName = string, Roles = comma delimited list of DNN role names

If the specified user is Not in any of the specified roles then your content is displayed.
e.g. Check if a user is not a member of a particular role(s)

This functionallity would be very useful if you would like to show a specific subset of template content only to a certain security role group.

TotalComments

Parameters: commentslabel = string, myXMODID = integer

TotalComments will display the total comments count in your list or detail views.

Extremely useful to show the number of comments on  a list view template.

TotalRatings New in v2.5.1

Parameters: Ratingslabel = string – default = “{0} vote(s)”

myXMODID = integer,

cssClass = string – css style
    
TotalRatings will display the total ratings count in your list or detail views.

This adds greater credibility to your ratings.

ViewCount New in v2.5

Parameters: label = string  - uses string.format default = Views {0} , image

myXMODID = integer,

update = boolean - specify if view count is incremented or not. default = false,

cssClass = string - apply a css style.

Now just like well known Articles and blog modules you can display how many times your XMod records have been viewed.

e.g. <fgct:viewcount runat="server" myxmodid="<xmod:recordid/>" label="Views: {0}" />

 

The abilty to show view count can be extremley important on an application like DNN professor's Business Directory application where you are selling directory listing subscriptions and the subscriber needs to know how many times their listing has been viewed.

Here is how I modify the Business Directory templates to show view count.

  1. Install the control according to the documentation that is included from FatGeorge.
     
  2. Next, I edit my List View template using the Xmod Plain Text editor.

    Add reference to FatGeorge Custom tag control
    The code looks like this:
    <xmod:register tagprefix="fgct" namespace="fatgeorge.CustomTags" assembly="fatgeorge.CustomTemplateTags" />
    
  3. Finally, I add the additional line of code to reveal the view count on the list view template.

    Add template code
    <fgct:viewcount runat="server" myXMODID="<xmod:recordid/>" label="Views: {0}" cssclass="dnnpSmall" />
    
  4. If I am using the Xmod separate detail module with my detail template, I add the same code to the detail view template.
     
  5. Save your template. Done!

The result can be viewed here.

Find more information on the FatGeorge Custom Template Tags Add-on for XMod here.

Enjoy,
Buck

Posted in: XMod Applications

Share    

Post Rating

Comments

There are currently no comments, be the first to post one.

Join the Discussion!


Buck Anderson - DNN ProfessorLet us know what you think. Or ask us anything. Or offer your own sage advice.

The only rule: RESPECT THIS HOUSE! Postings that contain abusive language and/or personal attacks will be cheerfully VAPORIZED. One cross word and – POOF! – your well-thought-out post will be gone in a puff of smoke.

          Buck

RSS comment feed RSS feed for comments on this post | Permalink URL

Note: For security, public comments require an Email address (Email will not be published and is also used for your Gravatar image)

Post Comment

Only registered users may post comments.


Copyright 2004 - 2012 by Jive Media Group LLC. All Rights Reserved.  | Terms of Use | Privacy Statement | Email White Listing | Site Map