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

Update ComponentsService.php #14

Closed

Conversation

alexmglover
Copy link

Added the ability to pass a full namespace into the sprig tag.

This use case would be in the case of having a class component in a custom plugin/module and wanting to keep the code in the same namespace.

As an example:

{{ sprig("\modules\sprig\ClassComponent" }}

Added the ability to pass a full namespace into the sprig tag.
@bencroker
Copy link
Contributor

I see where you’re coming from, but the idea is that all Sprig components share the same namespace and therefore live in the same folder, similar to front-end templates.

@alexmglover
Copy link
Author

alexmglover commented May 13, 2024 via email

@bencroker
Copy link
Contributor

No, this is currently not modifiable. Can you perhaps help me understand your use-case so I can consider it?

@alexmglover
Copy link
Author

alexmglover commented May 13, 2024 via email

@bencroker
Copy link
Contributor

That makes sense. I opted to make the namespaced component class a fallback, rather than a priority, in 4695cea. Can you take a look and let me know if that works for you?

@alexmglover
Copy link
Author

alexmglover commented May 13, 2024 via email

@bencroker bencroker closed this May 13, 2024
@bencroker
Copy link
Contributor

Released in Sprig Core 2.7.4 and 3.0.3.

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