1. Luke Plant
  2. semanticeditor
  3. Issues
Issue #19 new

Multiple stylesheets and classes

created an issue

With multiple stylesheets (if we're using multiple templates), not every style class will exist in all of them. The user might be offered styling classes that don't exist in the current stylesheet.

One solution would be to allow user-created styles to be assigned to templates in the admin interface.

Comments (4)

  1. Luke Plant repo owner

    An issue with this is that templates are defined simply by a setting, not a database model. This means that 'many-to-many' doesn't exactly describe it (we would probably want to use a comma separated list or something, but would need something nicer in the admin UI, so this is a significant amount of work. Another option is to use a many-to-many to an automatically populated dummy TemplateName model which we could do a many-to-many to).

    It also means that if a template is renamed, all the CssClass objects need changing (this is also an issue for all Pages objects -- renaming templates is Bad).

    A final issue is that plugins are not told which template they are being used for. I think I know a way around this though.

  2. evildmp reporter

    Implemented nicely.

    An improvement would be to choose styles for a template - at the moment, we choose the templates for each style, but it would be more convenient the other way round if this can be done.

  3. Luke Plant repo owner

    Templates don't exist in the database, so the only way to implement "choosing styles for templates" is to write a custom view which we would need to link into the admin somehow.

  4. Log in to comment