I was thinking that when someone did create a layout by typing in entity/numeric
, we could use a submit handler to switch it to the expected use: a layout at node/%
with a visibility condition limiting it to the single entity, either by ID or path.
That way nobody needs to learn a new behavior, but we deliver the feature we intended, and it will work closer to how they expect.
This is a follow-up to both https://github.com/backdrop/backdrop-issues/issues/2636 and https://github.com/backdrop/backdrop-issues/issues/5433#issuecomment-100...
From @docwilmot:
What if we automatically fixed this for the user? Meaning if a user types in entity/numeric we automatically converted this to entity/% and added a condition for entity id = numeric ?
from @jenlampton:
Can we add a condition for path instead of entity ID? I feel like that's going to be more in line with what people expect to happen.
We should also add a message saying "A condition has been added for this layout to match the path you entered" so that people don't think it's a bug.
Recent comments
In page.tpl.php you can get the current path and add it to the class array $classes[] = 'path-' . str_replace('/', '', $_SERVER['REQUEST_URI']); You will get an original class for each page....
Insert custom class into body tag
https://www.drupal.org/project/views/issues/1266388 shows that this is an architectural issue, and requires another 2 hooks being adjusted. It would be really nice to add comments/notes to...
node access
Hmmm, from D7 ancient tomes: from https://drupal.stackexchange.com/questions/7056/limit-which-roles-can-view-a-node-basing-on-its-content-type yet https://docs.backdropcms.org/api/...
node access