Hi again,
Sorry, but I'm having a slight problem. If I understand the renderer explanation, I can only overwrite the functions in outputrenderer.php. Is that correct?
The bits I know I want to alter are
In lib.php
function print_whole_category_list($category=NULL, $displaylist=NULL, $parentslist=NULL, $depth=-1, $showcourses = true) {
global $CFG;
if ($category) {
if ($category->visible or has_capability('moodle/category:viewhiddencategories', context_system::instance())) {
print_category_info($category, $depth, $showcourses); //<-The function is called here
} else {
return; // Don't bother printing children of invisible categories
}
}
/**
* Prints the category info in indented fashion
* This function is only used by print_whole_category_list() above
*/
function print_category_info($category, $depth=0, $showcourses = false) {} //<- I'm basically rewriting this
print_whole_category_list is called by a switch case in index.php
foreach (explode(',',$frontpagelayout) as $v) {
switch ($v) { /// Display the main part of the front page.
case FRONTPAGECATEGORYNAMES:
print_whole_category_list(NULL, NULL, NULL, -1, false);
break;
Now, in my frontpage.php, all of this is contained within main_content(), somehow. I don't see how.
Am I reading this wrong? Which renderer/ function am I trying to overwrite?
I've worked through the demo on the page that Mary pointed me to, and I'm OK with that, but I can't seem to replicate it with functions outside outputrenderers.php