BodyCssClass on initial content

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.
11/5/2012 4:28:34 AM
Gravatar
Total Posts 40

BodyCssClass on initial content

Hello,

After reading http://www.mojoportal.com/configuring-initial-content.aspx I built successfully an initial content .config file. But the BodyCssClass is ignored. Is this option available?

By the way, i think that when using the page settings and configuration links on a page with a BodyCssClass beeing used, the class should be ignored. Because usually we have a different home page for instance, and it makes the page hard to configure and add features, ...etc.

Best regards,
João

11/5/2012 1:13:57 PM
Gravatar
Total Posts 18439

Re: BodyCssClass on initial content

Its case sensitive, you must do it like this:

bodyCssClass="mybodyclass"
menuCssClass="mymenucssclass"

not BodyCssClass or MenuCssClass

There is nothing we can do to make a css class ignored if it is rendered in the markup. Generally the page settings and page layout must use the same skin as the page for a number of reasons. We "could" make it not add the body class on those pages but I'm not sure others would agree with that. Usually the body class is just used as part of a CSS selector like:

.bodyclass div.someotherclass {}

so it should be possible to construct css rules that only affect things in the actual content without affecting the layout or settings page unless you want to.

Hope that helps,

Joe

11/5/2012 2:59:11 PM
Gravatar
Total Posts 2254

Re: BodyCssClass on initial content

Hi João,

We run into the custom Body Css Class causing isses on these pages every once in a while. We wouldn't want the current functionality to change for various reasons so we generally just use .CUSTOMCLASS.adminpage as a start of a selector to fix or reverse whatever needs to be different for on the layout and settings pages. For instance, if we made the center column narrow with our body css class, we would add this to bring it back to whatever it's width is supposed to be, in this case, 960px.

.narrowcenter.adminpage .center-nomargins { width: 960px; } 

Notice there is no space between .narrowcenter and .adminpage.

HTH,
Joe D.

11/6/2012 8:15:48 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

Thanks Joe, i was missing the case sensitive.

Joe Davis, that worked very well ;) Thanks!

Best Regards,

João

11/7/2012 6:12:34 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

Regarding the initial content, i am adding a gallery, but i want to have 3 settings as follows (height, width, nivoSlider):

<contentFeature
featureGuid="d572f6b4-d0ed-465d-ad60-60433893b401"
contentTitle="Slides"
contentTemplate=""
location="center"
sortOrder="1"
cacheTimeInSeconds="0"
contentInstaller="mojoPortal.Features.UI.ImageGalleryContentInstaller, mojoPortal.Features.UI"
configInfo="~/Setup/initialcontent/gallery/slides"
galleryWebImageHeightSetting="335"
galleryWebImageWidthSetting="970"
useNivoSlider="true"
/>

But the installer just ignores the options. What am i missing? ;)

EDIT: Forgot to mention that the images get copied into media/GalleryImages/... correctly but the imageGallery module looks for the images in /Data/Sites/1/GalleryImages/... so i guess the "media" is missing. And after instalation, if i click "configuration" while logged in as admin, it says i do not have the required permissions. Thanks in advance.

Best regards,

João

11/7/2012 8:48:09 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

I tried this code:

<contentFeature
featureGuid="d572f6b4-d0ed-465d-ad60-60433893b401"
contentTitle="Slides"
contentTemplate=""
location="center"
sortOrder="1"
cacheTimeInSeconds="0"
contentInstaller="mojoPortal.Features.UI.ImageGalleryContentInstaller, mojoPortal.Features.UI"
configInfo="~/Setup/initialcontent/gallery/slides"
showTitle="false"
>

<moduleSetting settingKey="GalleryWebImageHeightSetting" settingValue="335" />
<moduleSetting settingKey="galleryWebImageWidthSetting" settingValue="970" />
<moduleSetting settingKey="UseNivoSlider" settingValue="true" />

</contentFeature>

But the result was the same. Options get ignored.

11/7/2012 9:06:04 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

So i've been looking at the ImageGalleryContentInstaller code and as i see it, it only expects configInfo to be the folder to copy. I think it should be an XML like FeedManagerContenInstaller for example, so that we could have a <folder folderName="myfolder" /> and then <moduleSetting .../> in that XML.

What do you think?

Best regards,
João

11/7/2012 10:34:26 AM
Gravatar
Total Posts 18439

Re: BodyCssClass on initial content

These content installers were developed primarily to support my needs to populate the demo site and I shared them in case others find them useful but they are not comprehensive ways to configure all possible features in all possible ways. I did not have a need for module settings for my purposes in populating the image gallery so I did not implement support for that.

If you would like to submit code changes to add functionality to it I will review your changes and consider integrating them, but it isn't a top priority for me at the moment to do it myself. If you decide to do it then make sure you put comments around your changes to make it easy to find them and send me the modified files.

Best,

Joe

11/8/2012 9:17:11 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

Thanks Joe, As soon as i update the code i will send it to you.

I have just one issue remaining regarding the initial content.

I create a Blog, with 3 posts using the initialcontent. I run the setup and all looks ok. But i click the rssfeed link on the blog and the page is empty. If i edit one post (just edit and save, don't change anything) and then access the rssfeed, it shows all 3 posts. This also works if i add a 4th post instead of editing one of the 3. Do you have any clues as to why this is happening?

Thanks in advance.

Best Regards,
João

11/8/2012 9:35:05 AM
Gravatar
Total Posts 18439

Re: BodyCssClass on initial content

Hi João,

The blog feed problem should be fixed in the latest code if you are working from the source code repository. Previously the friendly url for the feed was only created after creating a post through the UI but in the latest code we no longer need the friendly url for feeds. The friendly url was only needed because some feed readers don't like there to be more than 2 query string params in the feed url, so we solved it by combining the params together.

Best,

Joe

11/9/2012 10:38:36 AM
Gravatar
Total Posts 40

Re: BodyCssClass on initial content

Hi Joe,

Yes i am working with the source version. I just updated the code and now am getting:

\Blog\Controls\PostList.ascx(63): error CS0103: The name 'UseProfileLink' does not exist in the current context

when i access a page with the blog installed.

Best regards,

João

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