March 2020
Intermediate to advanced
608 pages
17h 17m
English
This mixin adds four fields to the model that extends from it: meta_keywords, meta_description, meta_author, and meta_copyright. The corresponding get_*() methods, used to render the associated meta tags, are also added. Each of these passes the name and appropriate field content to the core get_meta_field() method, which uses this input to return rendered markup based on the meta_field.html template. Finally, a shortcut get_meta_tags() method is provided to generate the combined markup for all of the available metadata at once.
If you use this mixin in a model, such as Idea, which is shown in the Using model mixins recipe at the start of this chapter, you can put the following in the HEAD section of your detail page template ...