How to hack moodle to make a metadescription?

How to hack moodle to make a metadescription?

by Ian L -
Number of replies: 3

2.7.2

Seems kind of basic but there is no description tag. I really only need this on my homepage (1 page). I tried modifying outputrenderers.php, but no luck. Any ideas?

Average of ratings: -
In reply to Ian L

Re: How to hack moodle to make a metadescription?

by A. Obeid -

HI Lan,

put that in your theme. In /moodle/theme/layout/..yourUseThemeName.. columns1,2 and 3. outputrenderers.php should also work. Did you clear the cache?


In reply to A. Obeid

Re: How to hack moodle to make a metadescription?

by Ian L -

Thanks for your reply. In outputrenders.php I put this:

$output .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
        $output .= '<meta name="keywords" content=", ' . $this->page->title . '" />' . "\n";        $output .= '<meta name="description" content="My meta description' . $this->page->title . '" />' . "\n";

But that didn't work. Page just went blank.


In reply to Ian L

Re: How to hack moodle to make a metadescription?

by A. Obeid -

I put the same in outputrenders.php (after line 488 ) that work fine.

Did the Page works without this change?