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

CSS and JS template default value "same as body" #496

Open
vincent-peugnet opened this issue Dec 21, 2024 · 1 comment
Open

CSS and JS template default value "same as body" #496

vincent-peugnet opened this issue Dec 21, 2024 · 1 comment
Labels
editor enhancement New feature or request

Comments

@vincent-peugnet
Copy link
Owner

vincent-peugnet commented Dec 21, 2024

I wanted to work on #286, but I felt a bit strange of having three possible value that could be sorted or filtered.

I think that the majority of uses cases of templates is covered by setting BODY, CSS and JS at the same time.

Maybe, the BODY template could be considered as the main template. Not using CSS and JS, or using another template, could be considered as an advanced template option.

This is already the one that is used to determine thumbnail and favicon.

So in the interface, CSS and JS templates could be set by default to "same as BODY" in the page edit view.

Database architecture

  1. use the current template value to indicate that it use the same as BODY.
    2.1 storing a special character like * in the CSS/or template value
    2.2 using a null value
    2.3 using a boolean value
  2. adding two boolean values called something like templatecsssameasbody
@vincent-peugnet vincent-peugnet changed the title CSS and JS template "same as body" value CSS and JS template default value "same as body" Dec 21, 2024
@vincent-peugnet
Copy link
Owner Author

Currently, I'm more in favor of the 2.2 design choice

A null could mean "this template setting is not set" ---> "because it use the main setting: BODY template" 😁
And the empty string would mean "do not use any template for CSS/JS".

But maybe I'm exaggerating 😅

@vincent-peugnet vincent-peugnet added enhancement New feature or request editor labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant