Is it possible on the clean theme to display the course full name and a logo - when I ad a logo to the theme the Course Titles (Course Full Name) are replaced by it on each course page.
Hi, yes it is but not without making some changes to the theme's lib.php.
to do it you would need something like this...(theme/clean/lib.php -> Original Code)
You would need to replace the original code with this...
$return->heading = '';
$page_heading = $output->page_heading();
if (!empty($page->theme->settings->logo)) {
$return->heading = html_writer::tag('div', $page_heading, array('class' => 'logo'));
}
Then some CSS changes like so...(clean/style/custom.css -> Original CSS ) changes highlighted.
.logo {
background: url(setting:logo) no-repeat 0 0;
display: block;
float: left;
height: 75px;
margin: 0;
padding: 0;
width: 100%;
}
.logo h1 {
margin-top: 20px;
margin-left: 20px;
font-size: 30px;
color: #333;
}
.dir-rtl .logo {
background: url(setting:logo) no-repeat 100% 0;
display: block;
float: right;
}
Thank you! Mary
I went a different route but appreciate the reply - I am a beginner at this so i would love for you to glance at what I did and let me know if this might cause problems. I decided I wanted my logo on most pages just not course pages and on course pages I wanted the Course Full Name but centered.
I am actually working off a clone of clean. So I made a copy of my theme's columns3.php and named it course.php - I then copied the $THEME->layouts = array(... part of the bootstrapbase config.php into my theme's config.php file and change the page setting for course to course.php
I then replaced the code in my course.php file as follows:
original code:
<?php echo $html->heading; ?>
replaced with:
<div align="center" class="course-title"> <?php echo $OUTPUT->page_heading(); ?></div>
Originally I left the Original code and just added mine directly beneath it - which did work to have both the logo and the title show up (of course if I removed my logo from the theme settings I would get the title twice) but I like having the title on the course pages better.
Any flaws in that process?
Hi,
You did well adding that alternative layout, so top marks for you!
The only flaw, if you want to call it that, is your use of an HTML attribute 'align'. This was depreciated in HTML5 which is what the Moodle DOCTYPE is in Moodle 2.5 onwards. The preferred way would be to use CSS to your theme's stylesheet.
For example: .course-title {text-align: center;}
Cheers
Mary
Hi,
I need to remove the header with logo where courses. are annoyed when students work in courses occupy much space
Moodle 2.8.3+ (Build: 20150205) theme : Clean
thanks