Custom Page Settings

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.
7/31/2012 2:13:22 PM
Gravatar
Total Posts 63
Jerry McCreary
SureFire Studios, Inc.

Custom Page Settings

Is there currently a way to add custom settings under PageSettings? (other than modifying mojoportal code)

8/1/2012 7:01:39 AM
Gravatar
Total Posts 18439

Re: Custom Page Settings

No, there isn't.

Best,

Joe

8/1/2012 5:55:22 PM
Gravatar
Total Posts 63
Jerry McCreary
SureFire Studios, Inc.

Re: Custom Page Settings

I (successfully) developed a custom module for my client that will re-direct a user if their IP address/country doesn't  match specified criteria. (As example, my client has a global market, but some of their products are only available in North America. So if a visitor is NOT in North America, he/she is redirected to other content in the site).

But now my client's requirements have changed. They want to have a page shown or hidden in the menu system based on IP address, which is why I asked about the ability to add custom Page Settings in this thread.

I was wondering if anyone in the forum has tackled this situation?

A couple of options I've come up with are:

  1. Create 2 different pages menus (based on 2 different branches in the sitemap) and test for the IP address in the layout.master
    •    Upside: Not changing core mojoPortal code
    •    Downside:  maintaining 2 sets of page menus
  2. Add a custom field(s) to the Page Settings (to specify if an IP-specific page), then test for this setting in PageMenu.ascx.cs (and in any other affected page)
    •    Upside: Easier to maintain; only one menu system
    •    Downside:  Changing core mojoPortal code

Any suggestions, ideas, or solutions welcome! Thanks.

8/1/2012 6:47:38 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Custom Page Settings

I can think of a way you could do this if these were authenticated users, but it sounds like you're talking about anonymous visitors?

I'm pretty sure you could accomplish hiding menu item(s) by name using some custom JavaScript, although like your option #1 that's not really a security measure, just a cosmetic patch at best. People who know the target URL could browse to it regardless.

As always, our recommendation is to avoid forking the code, so I would definitely discourage you from option #2.

 

8/1/2012 8:06:26 PM
Gravatar
Total Posts 63
Jerry McCreary
SureFire Studios, Inc.

Re: Custom Page Settings

Jamie,

Thanks for the input.  The javascript approach may work, since security isn't really an issue. 
I could assign a css class to the the page's Menu CSS option, and use a Javascript Onload to hide or show.

Thanks again.

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