Mezzanine setting

I have been doing mezzanine for some time, but I have not found many tutorials outside of the basic setup. Mezzanine documents contain information on how to customize page models and add new types of content.

However, I want to use existing types of content (pages, blog posts) in different ways.

For example, I want the custom Blog List page to be outside the default main post list.

How do I create this second page on the admin blog? How to configure a template for my custom template without touching the default template list template?

How do I have 2 different blog pages?

+6
source share
2 answers

Use the mezzanine.blog.models.BlogCategory model for different blog lists. If you are not satisfied with the β€œcategory /” on the way, you can copy and modify (below) mezzanine.blog.urls to your project urls.py.

url("^%s(?P<category>.*)%s$" % _slashes, "mezzanine.blog.views.blog_post_list", name="blog_post_list_category") 

To create category templates, check out the blog_post_list view and you will see:

 templates.append(u"blog/blog_post_list_%s.html" % unicode(category.slug)) 

To add a template for the Foo category, copy mezzanine/blog/templates/blog_post_list.html to your templates/blog/blog_post_list_foo.html . A new template will be displayed if you go to / blog / foo /.

+4
source

Check out Josh Cardmell's mezzanine blog post series. I found this series very useful when starting out with Mezzanine. MEZZaTHEMing (creating Mezzanine themes) Part 1: base.html .

0
source

All Articles