Adaptable Theme - 'notloggedin' class not present in body tag

Adaptable Theme - 'notloggedin' class not present in body tag

by Sheila Owen -
Number of replies: 6

Hi. I'm hoping someone can help with something that has been causing me grief!

We are using the Moodle 3.1 with the Adaptable theme. There is some content on the site home page that we would like to make visible or hidden depending on whether we are logged in or not.  With other themes you can render css if .notloggedin is in the body tag. However, the body class “notloggedin” is not present in the this theme. Any ideas?


Average of ratings: -
In reply to Sheila Owen

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

As far I know this is not a moodle or theme standard class.

You must add this class in the Custom CSS box with the properties needed.

In reply to Fernando Acedo

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Sheila Owen -

What I'm trying to say is that with other Moodle Themes the <body> tag for #page-site-index includes the class .notloggedin if you are indeed not logged in. I could therefore use CSS to display:none by using:
#page-site-index .notloggedin div.something {
    display: none;
}

But the class .notloggedin is not present

In reply to Sheila Owen

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

From the demo site, line 41:


<body  id="page-site-index" class="format-site course path-site gecko dir-ltr lang-en yui-skin-sam yui3-skin-sam adaptable-ws--demo pagelayout-frontpage course-1 context-2 notloggedin two-column  has-region-side-post empty-region-side-post has-region-middle empty-region-middle has-region-frnt-footer empty-region-frnt-footer has-region-frnt-market-a used-region-frnt-market-a has-region-frnt-market-b used-region-frnt-market-b has-region-frnt-market-c used-region-frnt-market-c has-region-frnt-market-d empty-region-frnt-market-d has-region-frnt-market-e empty-region-frnt-market-e has-region-frnt-market-f empty-region-frnt-market-f has-region-frnt-market-g empty-region-frnt-market-g has-region-frnt-market-h empty-region-frnt-market-h has-region-frnt-market-i empty-region-frnt-market-i has-region-frnt-market-j empty-region-frnt-market-j has-region-frnt-market-k empty-region-frnt-market-k has-region-frnt-market-l empty-region-frnt-market-l has-region-frnt-market-m empty-region-frnt-market-m has-region-frnt-market-n empty-region-frnt-market-n has-region-frnt-market-o empty-region-frnt-market-o has-region-frnt-market-p empty-region-frnt-market-p has-region-frnt-market-q empty-region-frnt-market-q has-region-frnt-market-r empty-region-frnt-market-r has-region-frnt-market-s empty-region-frnt-market-s has-region-frnt-market-t empty-region-frnt-market-t layout-option-nonavbar">

In reply to Fernando Acedo

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Sheila Owen -

Hi Fernando. Thank you for your reply. There definitely wasn't a notlogged in class in the home page body tag on our moodle site, so I presume I had the wrong version of the them for our moodle site. I've downloaded version 1.3.2 of Adaptable now, and it's there! 

Thank you for your help. I didn't want to use another theme as we really Adaptable.

In reply to Sheila Owen

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Fernando Acedo -
Picture of Plugin developers Picture of Testers

.notloggedin is added by moodle in the body. Then themes can use it or not and as far I know any of the most used themes apply any style using this class.

If you do not have the class in the body then you probably have some issue in your site.

In reply to Fernando Acedo

Re: Adaptable Theme - 'notloggedin' class not present in body tag

by Sheila Owen -

Thank you again Fernando.

As I said in my last comment, I downloaded the newest version of Adaptable, and the .notloggedin class is now being picked up in the body.

I am happy this has now been resolved, as we really love this theme. 

The only issue we have now is the language reverting to English after login. I am waiting to find out if it happens only for me or also for the users from the Spanish speaking countries. 

Sheila