Reputation: 851
I use DjangoCMS (3.2.3) on Django 1.8.12 along with djangocms-blog (0.7). I would like to link blog-posts
The app-hooked blog page is available with CMS' Link plugin. However, I do not see how I could link individual posts.
The only and in my eyes dirty workaround I have found is using the app-hooks URL and hard-coding the post's slug directly behind it. It only works if the post URLs are in "slug-only" mode, i.e. w/o categories etc.
Thanks for any thoughts!
Upvotes: 2
Views: 422
Reputation: 851
I just came across djangocms-styledlink
. Despite the styling capability this link package allows to configure links to other apps, too. For djangocms-blog
I added following lines to the setup:
DJANGOCMS_STYLEDLINK_MODELS = [
{
'type': _('CMS Pages'),
'class_path': 'cms.models.Page',
'manager_method': 'public',
'filter': { 'publisher_is_draft': False },
},
{
'type': _('Blog pages'),
'class_path': 'djangocms_blog.models.Post',
'filter': { 'publish': True },
}
]
It seems that currently djangocms-styledlink
only works with python 2.
Upvotes: 1
Reputation: 301
Currently there is no generic way to link objects handled by apphooks in the same way as django CMS pages. Providing a solution in a specific application is not trivial, as you basically needs a custom widget to do this
Upvotes: 2