What is the best approach to handle default page content when creating a new page

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/14/2018 1:00:45 PM
Gravatar
Total Posts 12

What is the best approach to handle default page content when creating a new page

Hi Everyone,

I'm looking to propose mojoportal as an option for an internal wikipedia however, I already know that the number of steps required to create a page with the required content may be too much for the users.

What I am trying to find out is if there's a way to show options when clicking the "New Page" that will allow the user to choose from a set of templates which will already have modules set up in the correct layout. In essence, it would behave like Content templates in that you could choose from a selection of page layouts, with each layout having predetermined features enabled in the correct order.

As an example, I'm trying to reduce the number of clicks required to add the place holder for HTML content, a video player module, and a comments module, when a user is trying to add a page that will have video on it that they would briefly describe.

I'm going to review https://www.mojoportal.com/developer-docs but if someone could tell me if this is even feasible or if there's a good link inside the developer docs to start with, it would be greatly appreciated.

Thanks in advance.

2/26/2018 2:58:38 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: What is the best approach to handle default page content when creating a new page

I think what you want is the Page Created Event Handler. You can use that to set up code that will fire each time a page is created. Within the handler, you would do appropriate pre-testing to make sure the situation calls for the additional content you want on the page, then inject that content via code. There should be many examples of how to add new features to a page; for example, the default HTML instance that's added to new pages.

2/26/2018 3:13:46 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: What is the best approach to handle default page content when creating a new page

Or you could have a custom module that collects some info from the user and creates the new page. As a purely hypothetical example, this module (which might be called the "New Page Maker" and be visible only to those in the appropriate role) might collect: what existing page to put the new page under, the new page name and heading, the first section of html, an image, and the final section of html. On clicking save, the new page is created with an html module with suitable markup inside, and the user is navigated to the new page to make any adjustments. Doing it this way there's really no limit to what can be achieved, but obv you do have to write this module!

You must sign in to post in the forums. This thread is closed to new posts.