Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Feincms mixing content types

I have a question and i want to know if i can mix 2 existing contenTypes together into one custom contenType. I need my own content type with contenType RichTextContent and ImageContent so that i can use a special template to show an image right and text left.

Is this possible ?.

like image 518
Johnny Mast Avatar asked Oct 13 '22 19:10

Johnny Mast


1 Answers

Yes, it's definitely possible. I've written my own custom contenttypes for similar reasons. You should review the code for the RichTextContent model in <Python egg dir>/feincms/content/richtext/models.py

You'll want to implement your own model class, and override the render() method to use django.template.loader.render_to_string() to load the template you want.

like image 79
Cerin Avatar answered Oct 31 '22 09:10

Cerin