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

Added parameter so filename is included in the partial mapping #260

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

Conversation

McGern
Copy link

@McGern McGern commented Sep 27, 2024

Added useFileNameForPartial to allow the partial to register with the full path and the filename.

Rationale:
Using the library with nested partials works well but it does become quite verbose especially when you are using partial blocks e.g.

Instance where there is a components folder with multiple sub folders all containing named components within a same named folder

{{#> core-components/wrapper/wrapper }}
inside
{{/core-components/wrapper/wrapper}}

The inclusion of this parameter will allow both the nested partial name and the filename only partial name to be registered, with the side-effect that any partials with the same filename will be will re-registered with the last instance found.

Added useFileNameForPartial to allow the partial to register with the full path and the filename
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.

1 participant