- Strictly speaking, the .ascx which populates a page (comprises its guts) is not a part of the page itself. This piece is a module. Let's assume our new page is to have a new module though. Making both a new page and a new module is a bit more painful than just making a page standalone as there seems to be an assumption that in most circumstances administrators will just use the baked-in canned modules, but, doing things the hard way, the first step is to just make a new web user control in Visual Studio. Look at what the others inherit from at their code behinds and mimic this.
- The packages in a .dnn file are an important wireup for a page/module pairing. Copy and paste an existing entry into the file and then doctor it up to reference your .ascx at controlSrc. (There should be one module control in moduleControls and it should not define a controlKey, i.e. have an XML tag which just closes, and should have "View" as the controlType.)
- Make sure your templates are up to date from source control. In the root of your application folder there will be a "Portals" folder which will have a folder inside of it of your naming (er, your company's naming) which has your templates.
- Log in as host at the application.
- Make sure the templates are up to date within the application itself. Click the "admin" link at the ribbon at the top of the app and then the "Site Settings" icon on the page full of icons which appears. Finally, click the "Update" link at the very base of the "Site Settings" page which appears.
- Go back to the page full of icons and click on "Pages" instead of "Site Settings" this time. Make a page here.
- Edit Internal.sitemap back in Visual Studio to get the page to appear in the menu system.
- Visit your new page. From the arrow at the upper left (assuming you're logged in as "host") expand the menu and pick "Delete" to delete the default module. You will next add your module here.
- Click the "host" link at the ribbon at the top of the application and then click the "Portals" icon. You need to export the portal templates from here. As I type this I cannot really remember exactly how to do so. It looks like you may do so in an onesies and twosies way with the "Export Portal Template" option from the menu that expands from the arrow at the upper left.
- Commit to source control anew.
Addendum 7/12/2015: I believe "Module Definitions" will let you update templates. I have following notes on "Module Definitions" with regards to adding a module:
- Edit the .dnn file to add a module.
- Change the version number at the top of the .dnn file.
- Log in as host.
- Click the "Host" link at the top navigation and then the "Module Definitions" icon.
- Pick "Create New Module" from the menu that comes from that downward pointing arrow at the upper left.
- "Create Module From:" should be set to "Mainfest" and some of the other dropdowns should be comparably set to allow you to select your .dnn file.
Addendum 7/14/2015: "Module Definitions" will NOT let you update the templates. After you add a module, add it to a page to flip the No to a Yes for the line item at the list at Module Definitions. Make sure your new page isn't already in the sitemap in the wrong place too when trying to add a page to the sitemap.
Addendum 7/16/2015: Remember to click the "Include Content" checkbox when exporting a template.
No comments:
Post a Comment