Hi everyone, I want to know if it's possible to create a custom page for a single category on moodle based in the category id?
If it's possible, how I could do that.
I'll be very grateful if someone can help, see ya.
If you mean can you create a theme for a category, then yes, you can.
Themes can be applied to courses and categories - just apply the theme to the category in its settings page
Richard
I don't want a theme for a category, I want to display a diferent content directly inside a particular category. Only one category will have this content(created directly in HTML) inside, all others will work normally
I think this because of the funcionality based on Wordpress software, I think Moodle can have something similar
Hi Fabio,
Content isn't displayed directly in a category, it is displayed in courses - categories, as I see it, are groups of courses, an organisational tool, a bit like folders holding files and files holding the content on your pc.
What I would suggest is creating a single course to hold your HTML, add that HTML to the Topic0 section of the course using the HTML editor and hide all the other sections below it. You can then choose whether or not to have any side blocks etc. on your page. If you remove all the side blocks so you are left with just the centre content section and you do as I have suggested, then this should look as if you have your HTML content sat immediately under the site header and menu. If you need to remove those as well, then you can apply a display:none rule to parts of the page based on the courseid found in the bodyclasses of that page as needed - I wouldn't apply it to the categoryid as this would hide those sections in all the courses held in that category!
The alternative would be to just put your html as a file in your web directory then instead of linking to a moodle course in that category, set your menu/hyperlinks or whatever navigation you are using to point to that html file instead of a course page.
Richard
Try this:
I have not tested this idea...so it might not work as you would like to see.
HTH
Mary
EDITED: 05/05/2010 - 14:12AM (UK)
I have just tested this and it works OK.
Cheers
Mary
how can i add a php file like forum.php in theme/layout directy and configure in config.php to have customized forum page
'forum' => array(
'file' => 'forum.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
is not working for me
That is because there is no 'forum' layout as such.
I think Forum pages fall under either 'course' layout or 'incourse' layout...it may even be 'standard' layout.
If you go to Site Administration > Development > Debugging and Enable the General page information, you will see at the bottom of the page which layout it uses.
HTH
Mary
thanks for your reply Mary!
yeah i realised slowly that we cannot add forum.php like that
so is there a way i can have customized page for every activity inside course. like quiz , assessment ,forum
or atleast can i use different bg image for a div, inside quiz assessment and forum pages using same incourse.php
in other words how can i get to know the curent activity inside 'incouse' layout
Hi Arjun,
If you look at the page source of the page you want to style, you can look at the body classes - for instance the below is the <body> for this page
<body id="page-mod-forum-discuss" class=" path-mod path-mod-forum gecko dir-ltr lang-en yui-skin-sam yui3-skin-sam moodle-org pagelayout-incourse course-5 context-115 cmid-46 category-1 content-only">
You can the ids and classes of this to target sections of your css to style various different elements of your site.
HTH
Richard
You can STYLE any ELEMENT on a page the way you want it to appear.
Just as Richard pointed out each page has a set of predefined 'body classes'. This means you can use these 'body classes' in your CSS stylesheet.
I hope this helps?
Mary
Richard & Mary
That worked for me .
thanks