My First Craft CMS Module

Getting Started with a Module

We cover what a module is and what we'll build in this course.

Mod­ules in Craft are a way to extend a Yii appli­ca­tion. Yii is the PHP frame­work on which Craft is built. So, mod­ules aren’t a Craft con­ven­tion, they’re a Yii con­ven­tion. They’re meant to be used for self-con­tained soft­ware that has com­po­nents to sup­port the main application. 

Plu­g­ins in Craft are also Yii mod­ules but have a few extra capa­bil­i­ties in Craft. You can check out the plu­g­in devel­op­ment cours­es here on CraftQuest for more information.

In Craft, the gen­er­al­ly accept­ed use of mod­ules is for mis­sion-crit­i­cal func­tion­al­i­ty that shouldn’t be unin­stalled like you would a plu­g­in. The mod­ules are typ­i­cal­ly part of the project files, mean­ing they’re not installed via Com­pos­er or oth­er pack­age man­ag­er. They are part of your project the same way a set of Twig tem­plates are. 

For this course we are going to cre­ate a mod­ule to do some­thing very sim­ple: manip­u­late the Craft CMS con­trol pan­el so it has an extra nav item in it. 

My First Craft CMS Module is made up of the following videos: