Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesImplementing templates for your modulesImplementing templates for your modules
Previous
 
Next
New Post
10/3/2011 2:13 PM
 
What is a good way to implement a template system to allow users to customize the layout of my module? I would imagine I need to define my own tags and then replace them with controls/data. But is there a common method (tutorial) to doing this and/or is there stuff in the DNN API to facilitate this?
 
New Post
10/3/2011 7:37 PM
 
typically modules implement this by using the core support for token replace - see http://www.dotnetnuke.com/Resources/Wiki/Page/IPropertyAccess.aspx . This allows you to let users specify html/script in your template and imbed the relevant pieces of data with tokens e.g. [MyModule:SomeData]

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/3/2011 7:37 PM
 
oh, and I should mention that as long as you code it correctly you can use the existing core tokens -see http://www.dotnetnuke.com/Resources/Wiki/Page/Tokens.aspx

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
10/4/2011 12:29 PM
 
Thanks. Will this work with controls also? I have a few controls I want to allow users to layout. The controls of course have code-behind that needs to run so it's more than just HTML replacements.
 
New Post
10/4/2011 9:30 PM
 
no, controls wont work within the template and token replace is just a way to inject text - whilst this text can be the output of controls the actual control definitions themselves can't be injected as it's just pure text and not something that is executed - you can of course use something such as razor and do the compilation prior to output (whilst it's possible to do this with user controls/server controls it requires full trust due to useage of CodeDOM)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesImplementing templates for your modulesImplementing templates for your modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out