costume page

costume page

by m question -
Number of replies: 10
hi, I want to customise categoty page and I will be greatful for any help to direct me where to start I have more than 6 category. the page want to change its appearance is in \course\index.php at least that's what I think the current one just shows list of courses, but I want it to be more like web page. my qustion is where I should chang to make course\index.php appears like web page, I want to change its appearance by adding text area for category info, list of courses, announcements,& I want to change number of coluomns. I think this is theme issue so I hope this forum does not move to other one :S thanks
Average of ratings: -
In reply to m question

Re: costume page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

Do you know how to make a webpage yourself? What I need to know, is do you understand HTML and CSS?

Cheers

Mary

In reply to Mary Evans

Re: costume page

by m question -
yes I know the basics of HTML and CSS I did created web pages while a go what I do not know is PHP and I am studying it but I could not understand where I should make any change to customize the category page. thanks
In reply to m question

Re: costume page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

OK...

Look in your theme's config.php and find the $THEME->layouts = array(... ... ...);

where all the different types of layouts are listed.

If it is not in your theme config.php then copy and paste it from theme/bootstrapbase/config.php

Then where it says coursecategory change the name of the file...

    'coursecategory' => array(
        'file' => 'columns3.php',
        'regions' => array('side-pre'),
        'defaultregion' => 'side-pre',
    ),

to one that you can easily remember, something like mynewcategoryfile.php

Now make a copy of layout/columns3.php and rename it to layout/mynewcategoryfile.php

Now you can change this new file to whatever you like using just HTML & CSS to style the changes and leave the PHP that is there to make the page work.

You can also add the CSS directly to that page by putting it in the <head></head> part of the page using...

<style type="text/css">

h1, h2, h3 {
font-size: 130%;
color: red;
margin: 0;
padding:0;
}

</style>

Hope that helps?

Mary

Average of ratings: Useful (2)
In reply to Mary Evans

Re: costume page

by m question -
yes that's exactly what I need. you really great person thanks for the help. when I did the change nothing appears in moodle page . when u said copy and paste you meant I copy $THEME->layouts = array( ......); all of layout not just the coursecategory, right?? my theme is essential but this is new pc and I have difficulties in downloading the theme . my net is too slow but I tried to change course category in clean theme and the result is white page. Thanks
In reply to m question

Re: costume page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ummm....

Sounds like you have broken the layout some how.

Please can you upload the file you added your changes to?

thanks

Mary

In reply to Mary Evans

Re: costume page

by m question -
thanks, it worked it was syntax error :D , I enable developer debugging errors for developers and it was helpful, thank u

so I can now change theme, but how to add text for each category page?

I mean if category 1 will have welcome message different than category 2 and the announcements are also different

I can add HTML block for that but I want to ask if there is different approaches?I want the text to be inside main column 

In reply to m question

Re: costume page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

You would need some php to do that.

If it is possible to do, where would you want this welcome message to appear?

In reply to Mary Evans

Re: costume page

by m question -

I want it to appear in left & Middle columns of moodle page, I do not want blocks. I want it in the red rectangle in the following.



the news must be under the welcome message

then I want to show the courses which is already showed in Moodle I need to make header for the courses.


In reply to m question

Re: costume page

by Robert Brenstein -
Each category has a field called Description, when you edit it. Whatever you put into that field is displayed above the course list for that category. Sounds to me like a way to display a welcome message and news without having to do PHP coding, just some HTML-based dressing of the texts.
In reply to Robert Brenstein

Re: costume page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I was hoping that would be the case, Robert, the fact is I've not had time to look this up yet, but it was my first thought as that is how courses work too.

I'm also wondering if each category page has a section zero, so that it could hold blanket text no matter the category the info would be the same.

Cheers

Mary