Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per page CSS #132

Open
pau1a opened this issue Sep 13, 2020 · 2 comments
Open

Per page CSS #132

pau1a opened this issue Sep 13, 2020 · 2 comments

Comments

@pau1a
Copy link

pau1a commented Sep 13, 2020

Hi there,

Have you considered adding the functionality to this plugin to add css to a template on a per page or per include basis?

@yakky
Copy link
Member

yakky commented Nov 1, 2020

@pau1a I don't think that css belongs to this package

could you elaborate more your use case?

@wesleyboar
Copy link
Contributor

I agree with @yakky.

Here is some general direction for per-page CSS, independent of djangocms-page-meta:

  • In development, for testing, you can easily author per-page CSS via djangocms-snippets
    • That plugin should only be used for development, not production!
    • A more manageable solution is strongly suggested for production.
  • In production, you could (probably), via a custom templatetag, automatically load per-page styles.
    • In templating, you can identify a page via current_page.reverse_id or current_page.id.
    • I have not tried this in Django CMS (I plan to someday), but have used this solution on another CMS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants