DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Custom template and ".resources" file

Sort:
You are not authorized to post a reply.





New Around Here





    Hello,

     I have noticed DNN providing a default Template file and a default template.resources file in theor source code at Website/portals/_default/

    IThis is where the default template for the website loads up from. I have a custom website which i have created a custom template called "x.template" at the same level as default. And I am saying my code to use the custom template instead of default one provided b the DNN.

    The problem here is DNN also had a file with .resources extension for default template which i assume is a binary file and was created from the original template. How do I create a ".resource" file for my custom template? And how is a .resource file used by DNN?






    Veteran Member





      Default Website.template is an XML file. You can open it with a text editor, or any other editor that can handle XML files. It defines all of the attributes of the portal (website) that is created. This includes portal settings, roles, pages, modules and module contents, etc. Essentially this is everything that is needed to create the default website.

      Default Website.template.resources is a binary file that contains other resources for the website: things like images, etc.

      Default Website.template.en-US.resx is a .resx file that contains default resource texts strings, etc.

      To a certain extent, these files are somewhat obsolete. And, I'm not aware of a way to created this in current versions of DNN. I believe that you can do this be exporting from older versions of DNN, but I don't know when the switchover occurred.

      I tend to use the Blank Website files and that doesn't include a .resources file, as it's not needed.

      If you want to create a basic website, the best way to do it with current DNN versions is to create your prototype website. I would start with the Blank Website and add to it whatever you need. Then use the Export/Import tools to export this prototype site.

      To create a new portal, create on with the Blank Website template and then Import your exported portal to the new blank one.

      If you need to do this in a completely different DNN install copy the export folder from /App_Data/ExportImport to the new install, and import that you a blank website there.

      ---------------

      As an aside, I think that it would make sense if the DNN developers switched the install and portal creation functions to use Exported portals as the templates for new installs and new portals.

      Or, if anyone knows an easy way to create portal templates, I'd love to hear where to find it.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      Veteran Member





        I should also have pointed out that pages can be saved as "Page Templates" in the old form, and that these can be used when new pages are created.

        (That doesn't get you to a portal template, though.)
        Joe Craig
        DNN MVP
        Patapsco Research Group





        New Around Here





          Thank you Joe for the information. Yes it makes sense, I will start off using a blank template.
          You are not authorized to post a reply.

          These Forums are dedicated to the discussion of DNN Platform.

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

          1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. 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.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. English language posting only, please.

          Would you like to help us?

          Awesome! Simply post in the forums using the link below and we'll get you started.

          Get Involved