Skip to content

Allow sections & snippets within subfolders#142

Open
westonganger wants to merge 1 commit intolocomotivecms:masterfrom
westonganger:sections_snippets_subfolders
Open

Allow sections & snippets within subfolders#142
westonganger wants to merge 1 commit intolocomotivecms:masterfrom
westonganger:sections_snippets_subfolders

Conversation

@westonganger
Copy link
Contributor

@westonganger westonganger commented Jun 5, 2019

Solves locomotivecms/engine#1313

[WIP] currently only works locally with wagon serve, deploying has issues which can be solved using encoding and decoding of the url.

@did
Copy link
Member

did commented Jun 22, 2019

thanks @westonganger! I think I can fix the deployment thing.

@did
Copy link
Member

did commented Jul 22, 2019

In order to avoid slug collisions, I suggest that the convention for the section slug should be <sub folder>--<filename of the section>.

Examples: global--header (sections/global/header.liquid), home--page_hero (sections/home/page_hero.liquid).

@westonganger what do you think?

@westonganger
Copy link
Contributor Author

I would definitely prefer to refer to them via the path home/page_hero when calling it in the view.

However under the hood for the slug, I would propose the following (in order of preference)

  • home::page_hero
  • home:page_hero
  • home--page_hero

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants