Search for Resources and Solutions

How to create a user's theme for Midrub

This is the first article for user's themes and i'm sure there will be hundreds of articles about how to create an user's theme.

First of all, i want to say for me is important the speed and for this reason i didn't added soo many available functions like in other CMS. Moreover i've grouped the hooks per category to load them only when is required. 

To create a user's theme for Midrub:

  • Create a directory in application/base/user/themes with your theme name.
  • Create a directory in assets/base/user/themes with your theme name.

Then in application/base/user/themes/your-theme/ directory create the config.json with your theme's information:


                                                
{
"name": "",
"description": "",
"version": ""
}

Then in application/base/user/themes/your-theme/ directory create the file main.php which will be used as your theme's main file.

In other my articles i will explain step by step what you can add there.

For now add this function inside the php tags

                                                
get_user_view();


This function will display the app/component's content. But there are special functions to display menu, styles and js code.

Then add in assets/base/user/themes/your-theme/ a png image with the name screenshot and resolution  640x326 and your theme is ready.


Was this article helpful?