How to display data in card layout

How to display data in card layout

by Sarath P -
Number of replies: 4

Hello everyone,

I am trying to display the enrolled courses from a specific category of a user in the card layout. I have searched and found that in order to achieve this we need to use templates/renderers. So, I have created a local plugin and managed to display the output as plain text using the renderers.

Now, how do I display the output in the card layout with the name and course image? 

Moodle version 4

Thanks in Advance.

Average of ratings: -
In reply to Sarath P

Re: How to display data in card layout

by Sarath P -
I am sorry. There is a correction in the above. I have displayed the output as plain text using the templates.
echo $OUTPUT->render_from_template('local_mypage/manage', $templatecontext);
In reply to Sarath P

Re: How to display data in card layout

by mark Mickera -
I am making an attempt to show the enrolled guides from a particular class of a consumer in the card layout. I have searched and located that in order to gain this we want to use templates/renderers.
In reply to mark Mickera

Re: How to display data in card layout

by Sarath P -
Hi Mark,
I am also trying to achieve the same end result. I have a custom SQL query and based on that, I need to display the values in the card layout. I understand that we have to use templates. I have also found some references regarding course cards. But I am not sure how to implement the same. Check the course/templates/coursecard.mustache.