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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow to modify a template ?How to modify a template ?
Previous
 
Next
New Post
10/27/2009 5:36 AM
 

Hi,

I use the Repositery Module for a FAQ on my site, so I decided to use the Articles template to do this. It's just exactly what i was searching for, so i'm happy. Now, I would like to modify some settings in the template, because some tokens appears in the article and I don't need it.

For exemple, actually I have :

Title of the article
Author
Date
Summary

But I just want to have :
Title of the article
Summary.

By the way, i would like to change the font size for title, is it also possible ?

End of all, I would like to delete the "Sort By" list box ?

Thank you very much for your help,

Jocelyn

 
New Post
11/2/2009 8:37 AM
 

First thing is create a folder in your "Portals/#" (where # is the Portal ID in which you are working) folder named "RepositoryTemplates". Then copy the "Articles' folder from the /DesktopModules/Repository/Templates folder to the newly created folder.

You want to do this for 2 reasons, by editing a copy you can apply new updates to the module in the future and your changes will not be overwritten, and secondly, if you mess up, you can just re-copy the template files again to start over :) .  The template engine always looks in the Portals/#/RepositoryTemplates folder first, then the /DesktopModules folder second.  In the module settings you can tell where a template is being loaded from, if a template is being loaded from the Portals folder the template name will have an asterisk next to it, if there is no asterisk, then the template is being loaded from the DesktopModules folder.

When done you should have a "/Portals/0/RepositoryTemplates/Articles" folder (assuming you are doing this for Portal 0, if not, make sure to use the correct PortalID.

Now, edit the template.html file in that new folder and remove the [AUTHORNAME], [CREATEDDATE] tokens so that those data elements will not display.  To change the font size for the title, edit the template.xml file and modify the 'class' setting of the TITLE token.  You can enter any of the existing stylesheet classes, or you can add your own class to your stylesheet (through Admin->Site Settings->Stylesheet Editor), then specify the name of your custom class at the Value setting.

<Object>
  <Token>[TITLE]</Token>
  <Settings>
    <Setting>
      <Name>CssClass</Name>
      <Value>h1</Value>
    </Setting>
  </Settings>
</Object>


You can remove the [SORT] token by editing the Header.html

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow to modify a template ?How to modify a template ?


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