Skip to content

Allow sections & snippets within subfolders - #142

Open
westonganger wants to merge 1 commit into
locomotivecms:masterfrom
westonganger:sections_snippets_subfolders
Open

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

Conversation

@westonganger

@westonganger westonganger commented Jun 5, 2019

Copy link
Copy Markdown
Contributor

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

did commented Jun 22, 2019

Copy link
Copy Markdown
Member

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

@did

did commented Jul 22, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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