Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

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.
10/5/2012 6:40:18 PM
Gravatar
Total Posts 355

Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

I'm doing some white-label work, and I'd like to bundle everything up so that the team I'm handing my work off to can simply run and go. Following "Populating Feature Content", I'm about 90% to where I want to be. I can set the default skin in the web.config, but 

a) I'd like to be able to set the skin for each page (more than one skin being used for this project)

b) I'd like to be able to set the custom CSS property for each module, so that there's no confusion for the team working on the other end.

I thought that this:

<moduleSetting settingKey="CustomCssClassSetting" settingValue="quarters" />

when set in the content config file for a feature, would set the custom CSS, but no luck. Any other suggestions would be greatly appreciated; I'd really like to get this down, to speed up hand-off on future projects. Thanks!

Edit: Oh, BTW - what setting string would I use for a page not included in the menu?

10/6/2012 8:28:41 AM
Gravatar
Total Posts 18439

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

There is nothing built in currently to set different skins on initial content pages. It is not a comprehensive system that can do everything, it was mainly built so I could easily populate and reset the demo site and I did not have a need to do that for the demo site.

If your customer would like to pay me to make it a development priority to add that functionality feel free to contact me privately.

You can set module settings, but you need to make sure you are using the correct settingKey which you can lookup in the feature definition files. The custom css class setting for the Html Content feature for example is "HtmlCustomCssClassSetting", it may not be consistent across features that support it, I think some of them do have it as you've entered it.

Best,

Joe

10/6/2012 9:26:43 AM
Gravatar
Total Posts 355

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

Separate skins per page is not a huge priority - more of a "nice to have if it's already there", since they didn't even know this much was feasible. That being said, it would make my life easier, so we'll talk. I woke up this morning envisioning a content exporter that would auto-generate these files for legacy versions of mojo, or deployment from staging to live when straight database copy-over isn't feasible (yeah, my subconscious works like that).

I tried both "HtmlCustomCssClassSetting" and "CustomCssClassSetting" - no joy either way. Here's an example of one .config page:

~~~~~~~~~~~~~~

<moduleSetting settingKey="HtmlCustomCssClassSetting" settingValue="quarters" />

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sed eros et dolor euismod lobortis. Quisque eu ante nec lacus dapibus vestibulum.</p>

~~~~~~~~~~~~~~

And here's the feature setup

~~~~~~~~~~~~~~

<contentFeature
featureGuid="881e4e00-93e4-444c-b7b0-6672fb55de10"
contentTitle="Q1PanelHome"
location="center"
sortOrder="1"
cacheTimeInSeconds="0"
contentInstaller="mojoPortal.Web.HtmlContentInstaller, mojoPortal.Web"
configInfo="~/Setup/initialcontent/cerevecontent/cereve-homepage-panel.config"
/>

~~~~~~~~~~~~~

Everything works perfectly, except for the configuration of things like Custom CSS and show title. Is there something I've missed? Pre-setting the custom CSS alone would make life so much simpler on these projects, especially in the case of multiple pages.

10/6/2012 9:52:33 AM
Gravatar
Total Posts 18439

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

Actually there are separate content installers per feature and it doesn't appear the html content installer has anything for module settings, it only points to a raw text file that has the html content. Making it more elaborate by changing it to an xml file like some of the other feature content installers at this point would be difficult because it would break existing content files.

You can currently set menu and body classes on pages using the bodyCssClass and menuCssClass attributes in the xml for the page if that helps.

Hope that helps,

Joe

10/6/2012 9:53:55 AM
Gravatar
Total Posts 18439

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

Oh and thanks for the cups of coffee! Much apreciated.

Best,

Joe

10/6/2012 10:01:07 AM
Gravatar
Total Posts 355

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

You're very welcome; I'm grateful you're up and awake enough to give me an answer, so that I can move forward with current tasks - at least now I know I'm not losing my mind.

While I understand not wanting complexity, making the .config settings for modules consistent in at least the settings that are standard to mojoPortal would be a terrific idea. It would also make it easier to export legacy content to deploy into a "latest and greatest" site a bit easier, which is more of a factor now that mojoPortal has become more mature. It's usually very easy to upgrade mojoPortal (thank you!), but there are situations where starting from scratch just makes more sense, especially if there's significant UI/layout updating, or 'porting between environments or stack configurations (MySQL=>MSSQL or vice-versa, for example).

10/6/2012 10:20:01 AM
Gravatar
Total Posts 18439

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

Again this content installation stuff was mainly to support my needs for the demo site so I implemented the simplest solution possible to meet those needs. The Html content installer was the first one and the most simple, I didn't need to set any module settings on it for my puposes, but for others like the Flickr module I could not populate any content without setting them. Each feature is different in terms of what it takes to populate it, Image Gallery and WebStore are much more complex for example, I did what was neccessary for my goal and no more and documented it in case others found it useful. Making it complete enough to claim it could be used for site migration would be a very big job and would probably just add a lot of load to support requests considering differences in versions and changes in features over time, it could never really be completely finished and comprehensive and reliable for all features and settings.

If it were an easy change to solve for the html content feature I'd consider doing it just to help you personally, but in general for people making "white label" use of my work I want them to support me financially especially since they are trying to hide the fact that they are using my work from their customers. They can do that but I'm not motivated to work for free to meet their needs.

Maybe someday it will become my own priority to improve the content installers but while I work on my own dime I set my own priorities and that isn't a top one for me right now. 

Best,

Joe

10/6/2012 2:06:55 PM
Gravatar
Total Posts 355

Re: Content Pre-Population: How to Set Skins by Page/Module Custom CSS?

I get where you're coming from, and I always recommend your plugins as an upsell, as appropriate to client needs; we can talk more about this in e-mail.

I did come up with a solution that'll work for now; I've included a .sql file with updates based on module names (default placeholder content, therefore consistent naming conventions), as well as settings based on page name, etc. It's not beautiful, but it works, and that means less configuration headache on the handoff.

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