Skip to content

Loading…

Tagging support for pages #1412

Closed
xen0n opened this Issue · 13 comments

5 participants

@xen0n

As maintainer of the website of my school, I'm often requested to support adding tags to pages so that articles doesn't need to be duplicated in order to appear in multiple categories. So I went to extend the models and wrote a frontend plugin for actually rendering the list.

I'm opening this issue to ask if you upstream staff are willing to accept such a feature enhancement, and the way you'd like to integrate the feature, so I can properly prepare the patch.

Thanks in advance.

@digi604
Divio AG member

what are you using for tags?

@xen0n

@digi604 Just like in any reasonably decent blog, acting as some kind of "keywords". We are using tags to help post news or announcements in proper categories while maintaining lists of recently published "news" or "announcements", for example.

@digi604
Divio AG member

i know what you want to use tags for... but do you use a new dependency for this? Are you using django-tagging? What is the dependency?

@xen0n

@digi604 No, there is no external dependencies besides django-cms itself.

@digi604
Divio AG member

Would it be possible to implement tagging via plugins? Or why is a change in the page necessary?

@xen0n

The tagging is done in the admin site, so changes to pageadmin are needed. A Django application is used to host the tagged page list view, and also for generating the necessary menu hierarchy. Maybe the app can be removed by moving the menu generation into cms itself, but the change inside pageadmin is obviously necessary to get an "interface" for editing those tags.

I'm not quite into the internals of Django, so please tell me if the admin site integration could be done non-intrusively instead.

@digi604
Divio AG member

Show me some code... its easier that way

@xen0n

Just took some time to test that code on latest version of django-cms (the feature was implemented 1 yr. ago) and it seems OK.

The patch is here, please check out. Many places are not cleaned up; I wrote most of the code under a quite tight deployment deadline. Sorry for the inconvenience.

@ojii

-1. instead provide an easy way to attach inlines to pageadmin.

@neoascetic

...as shown here. But when you attach inlines, they aren't copied when you copy related page (just FYI, if you use pages copying).

@ojii how about official way (and note in docs) about extending base Page model? Also, ability to extend Navigation Nodes will be great too (for page's avatars, for example, shown in menu).

@kux

You might want to also check http://github.com/pbs/django-cms-pagetags. I don't know whether it fits all your use cases, but it might be worth looking at.

@ojii

absolutely -1 at allowing to extend the page model. this will only cause more trouble. FKs to the page are the way to go (for now), and we should merely make that easier. Allowing to change the page model would mean that we'd end up with a lot of incompatible page models and potential future changes by use the the page model would become harder.

@digi604
Divio AG member

there are plans to have an easy way to extend page and title models in the future... closing as wont fix

@digi604 digi604 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.