-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Partial tag subdirectory code incorrect #2985
Comments
It seems to work fine. I can't see a problem with the code. Can you provide any more details? |
I think the wording in the docs threw me off here. The docs recommend to put an underscore before each partial, so my assumption was this would also apply even if storing the partials in a Is the expected behaviour that partials in a |
Hey the docs state that the views need to be prefixed. In the example I don't see it saying the folders need an underscore. Let me know where it throws you off and I'll PR the docs to make it more clear. |
See statamic/ideas#305 where exactly this has been requested. |
Bug Description
The partials tag allows you to specify a path, but it also contains code to automatically load anything in the 'partials' directory if not found. This code is currently incorrect, as it replaces slashes with a period, but doesn't convert back to slashes when checking the partials directory.
How to Reproduce
Try to include a file in the partials directory without including the 'partials' dir in the include.
{{ partial:partial_name }}
Extra Detail
The screenshot below shows the line 31 in the Partial tag file checking if
'partials.'.$partial
exists, but it needs to run it throughunderscoredViewName
, otherwise it doesn't add the slash back in.Environment
Statamic 3.0.30 Pro
Laravel 8.15.0
PHP 7.3.24
Install method (choose one):
statamic/statamic
The text was updated successfully, but these errors were encountered: