beginner with mojo portal

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.
1/20/2010 10:48:27 AM
Gravatar
Total Posts 8

beginner with mojo portal

lost on where to start.

 

hi guys, im a bit stuck

what im trying to do:

create my own image rotator module thats more simplified to use, the in built rotator can go wrong, as after adding all the image it added <p> around it thus making it one element not 3.

so i've started creating the element but i need to store the order , images, and url's for the elements and i'm not sure how to connect and store these details (module specific eg, can have more than 1 of these modules on the same page). 

would love some advice as mojo portal is one of the best systems ive used (loving roles and page level permissions!)

1/20/2010 11:21:57 AM
Gravatar
Total Posts 18439

Re: beginner with mojo portal

Hi,

I recommend work with the mojoPortal Source Code in Visual Studio but do not modify any mojoPortal code because that is making a fork and it will be difficult or impossible to upgrade without losing your customizations. The reason to work with the source code is because of all the example code to learn how to do what you want to do in custom features by looking at how existing features do it.

I assume what you are calling our image rotator you mean our Html Content feature which has some built in javascript that can be enabled to create an easy slide show. But you are not happy with the slideshow and would rather make a custom feature to do specifically what you want.

If you are an experienced ASP.NET developer I recommend copy the .sln file and rename it, then you can add your own custom projects to the solution and use post build events to copy the needed files from your feature up to correct locations in Web folder so they can run. You can look at post build events for the mojoPortal.Features.UI project for example to see how we do it there.

If you are new to ASP.NET, you may find it easier to get started using inline code like in our Hello World Examples, so you don't need to create custom projects, you can juts drop your files in without actually adding them to the mojoPortal project in Visual Studio.

If you inherit from our SiteModuleControl then you get some stuff built in that helps with instance specific properties. You can define and store as many instance specific key value pairs as you like using Module Settings. The SiteModuleControl already has it a property named Settings which is a hastable. You can define module settings and default values through the UI under Administration > Advanced Tools > Feature Installation for quick and dirty features, or you can define them in FeatureDefinition files and the Setup page can install them.

If your custom feature needs to store data beyond key value pairs then you should implement your own table(s) and do whatever you like to for data access. You could use LinqToSql (if using MS SQL) or an OR Mapper of your choosing, or you can implement a data layer similar to what we implemented for existing features. For quick and dirty features you could even use saved queries from our query tool, but I would not go overboard with that approach.

For example code for using the module settings, take a look at the code for the Google Map feature for example in mojoPortal.Features.UI/GoogleMap/GoogleMapModule.ascx.cs. This feature has no tables of its own and only uses module settings to store all its settings. Probably an image rotator can be implemented also without using anything but module settings.

Hope it helps,

Joe

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