Learn More





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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Need a 101 on editing portal templatesNeed a 101 on editing portal templates
New Post
12/26/2014 2:27 PM

We have an issue that is a simple one.  Portal 0 Content Pane contains a Slider.  We want child portals to have an HTML  / Text module in its place.  This is because the slider on Portal 0 is for a message to new clients and once a person is a client they'll want to put a logo / text in that same place on their fundraiser.


Edit 20141226_14:34: From what I can see, there is no <pane> entry in the Template file if there is no module to be placed in it.  Is it correct to assume then, to have nothing in that pane to eliminate the entire entry that contains the Speedy App Slider that we want to replace?  I ask this because there are no empty <pane> tags in the <panes> section, so removing any module related elements from the pane but leaving all others would probably break the file.


Well, the module can be found easily enough in the template and removed.  But simply replacing it with an existing Text / HTML module, which has its own Unique ID, won't work as that unique ID obviously can only be used once.

 Because many reps will be creating fundraisers, we want to programmatically do this.  Any time we update the template, doing tedious manual edits and testing / re-iterating, will be cumbersome.

I can find the wiki page on Portal Templates but no real docs on the type of edits I'd like to do.  What's needed is a way to programmatically replace the Slider XML entry with an HTML/Text module when we export it.

If that capability is in the automated creation of the template I've missed it.  Writing the XML functionality is easy enough but there isn't a lot of time to fully research this, test it, etc.  Could use some documentation on working with the file with XML methods, if such a doc exists.


New Post
12/26/2014 7:16 PM
Sounds like the wrong approach to me.

You need to create a simple module that recognizes each user and allows them to input their text and logo. You store that in the DB using a key that keeps their data separate from everyone else's.

It may well be easy to start with the code from the HTML module - but I am pretty sure that programmatically creating HTML modules is the wrong approach.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
New Post
12/28/2014 7:52 AM

I could have stated the post better and in between it and your reply have arrived at a similar answer.

The Slider Module in the template needs to be replaced with a Text / HTML module which will install with every child portal.  To get the GUID one doesn't have to do any coding!  It's in the TabModules table when the module gets created.  So it's simple: Create a Text / HTML module to get the GUID.  Find the values for the Slider in the template and replace them with the new Text / HTML module values.  Bada Bing ... DONE!

Now when the template runs it installs that module instead of the Slider on the child portals. 

I was thinking originally that getting the values with C# code, leveraging the API was the way to get all of what is needed for replacement values.  Looking at the template elements better, it's far easier to just copy over any blank Text / HTML module elements from anyplace and then just replace the content, ModuleID and GUID, etc. with that of the new module.

Content, ModuleID and GUID are the only really unique items.  If there are others they're easy enough to find.


HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Need a 101 on editing portal templatesNeed a 101 on editing portal templates

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.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?