Can Theme override Front Page(s)? 2.5 Bootstrap

Can Theme override Front Page(s)? 2.5 Bootstrap

by Brian Merritt -
Number of replies: 1
Particularly helpful Moodlers బొమ్మ

I would like to generate a renderer or option in Theme that detects the front page, and which loads one of several front pages depending upon whether the user is logged in.

 

Is there a way for the theme to override or alter "main_content" ?  I presume (maybe incorrectly) that if I go

    $OUTPUT->main_content = $outputhtmlcontent ;

that things will go south.

I tried this method

$CFG->customfrontpageinclude=($CFG->dirroot.'\theme\iscacoach\layout\iscafrontpage.php');

 

Which works OK, but the moment I invoke any echo $OUTPUT->   then I get a "main_content" missing exception error.

Is the current method us $CFG->customfrontpageinclude still or are there better methods?

 

Thanks!

 

Brian

 

రేటింగుల సగటు: -