How do I separate the blocks when editing a template?
Example:
<?php echo $ output->blocks('course_summary', 'cssCourse'); ?>
I want to use the block with the course summary id, but he does not appear on the first page ...
................................................................
Or else thought but can not develop further on is this:
<?php echo $output->login_info(); ?>
It prints the block login information, which gives to make loggof and edit profile, etc ... But I can about the other blocks, or disassemble the login info to separate for example Avatar User's his name ... etc...
Still waiting for help ...
Templates in Moodle are used for rendering the output such as HTML or email messages bodies. Templates are defined as a text with placeholder tags. Placeholder tags are replaced with actual values during the rendering. Templates can be rendered both on the server side in PHP as well as on the client side in JavaScript.
Using a backup course as a template It is possible during the process of creating courses with a csv file in Site administration>Administration>Courses>Upload courses to specify and upload a backup file to be used as a template. Create your csv file.
A Moodle theme allows the user to change the look and feel of a Moodle site. Themes can be applied on the site, category, course and activity levels by users with permissions to do so. Themes can be designed for specific devices such as mobile phones or tablets.
Have a look here: https://docs.moodle.org/dev/Overriding_a_renderer
Basically you need to override output renderers to customize what $OUTPUT->blocks() renders. That method calls another method that will render blocks for a region (side-pre in this case). You should dig through the core_renderer class. Be careful when overriding blocks as to not break the editing state, which brings in extra controls to drag-and-drop and edit each block.
The block content itself is rendered in the block class. You can find it in moodle/blocks//block_.php. These you cannot override, but gives you an idea where the content comes from.
Related links that might be helpful:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With