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

Allow sections & snippets within subfolders #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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