Open jenlampton opened 5 years ago
bold path examples are what you actually type into layout configuration path field (including the literal %
wildcard symbol.
/existing/path
)
afoo/NODE-TITLE
)
afoo/foo
will NOT load the assigned layout (even if an alias called afoo/foo
already existshook_menu()
entry foo/%
exists)
hook_menu()
entry foo/bar/%
exists)
hook_menu()
entry for bar
exists)
bar/foo
will NOT load the assigned layout bar
will NOT 404 hook_menu()
entry for bar/%
exists)
bar/foo
will NOT load the assigned layout bar
will NOT 404 hook_menu()
entry for bar/anotherbar/%
exists)
bar/anotherbar/%
will NOT load the assigned layout bar/anotherbar
will NOT 404bar
will NOT 404 What we want to happen: @jenlampton @klonos @laryn ?
@quicksketch does the above look about right?
If you attempt to create a menu entry for a node at /about, you can enter
about
into the menu UI, and it knows that's an alias. The menu entry it saves is actually for the system path, atnode/2
.Could we do something similar for layouts? Many people who are new to backdrop try to put in an aliased path for the layout instead of the system path. Would it be possible check the path table, and do a switcheroo for them if we find a match?
For example, if they entered
about
we couldnode/2
, thennode/%
, andnode/%
for them.This might have to be done with ajax as soon as they tab out of that field, since the contexts in the next question need to be added dynamically too...