Jan. 30, 2019 Chris Shaw 71 views
The Aldryn news/weblog application for django CMS come with some very handy plugins to list and display articles that can be very easily added to django CMS pages. Plugins contain their own template files that can be easily overridden to suit the overall look of the site.
To create templates that override the default plugin templates, we simply have to create new templates that have the same names and folder structure in our app templates folder. The screenshot on the right shows the folder structure of an example django project. The 'django CMS' app is located in the folder django_cms. Inside the templates subfolder, I have created the folder aldryn_newsblog and subfolders includes and plugins. This matches the templates folder structure of the Aldryn Newsblog addon and can be found on the addon's Github page. As a starting point, I copy the entire contents of these template folders from Github, but if you are confident that there are only a few files you need to override, just copy those.
There is some documentation on customising the news output that you can read though. Basically,
While I am a fan of DRY programming, I dont want my list or articles to resemble the detailed view of a single article. Firstly, duplicate
To include this new file, edit
The variable with
We are ready to make our styling changes to