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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Adds a @antlers @endantlers Blade Directive Pair #8692

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

JohnathonKoster
Copy link
Contributor

This PR adds a new Blade directive pair @antlers @endantlers 馃檲

This is essentially syntax sugar for creating an Antlers partial and doing @include('antlers_file_name_here'), and lets you drop into Antlers when you need it:

@php($myVar = range(1, 10))

@antlers

    {{ myVar }}
        {{ value }}
    {{ /myVar }}

@endantlers


or...

@antlers
    {{ collection:articles }}
        {{ title }}
    {{ /collection:articles }}
@endantlers

Because it rewrites to an @include, variables created inside the Antlers will not be available afterwards in Blade-land.

@lokmanm
Copy link
Contributor

lokmanm commented Sep 14, 2023

@JohnathonKoster will this fix my use case 馃憖 Or is it for a different case?

@JohnathonKoster
Copy link
Contributor Author

@JohnathonKoster will this fix my use case 馃憖 Or is it for a different case?

I may have missed a discussion somewhere - do you have a quick overview or link about your use case?

@lokmanm
Copy link
Contributor

lokmanm commented Sep 14, 2023

@JohnathonKoster will this fix my use case 馃憖 Or is it for a different case?

I may have missed a discussion somewhere - do you have a quick overview or link about your use case?

Sorry lol, will I be able to use this tag for this use case here ?

@JohnathonKoster
Copy link
Contributor Author

@JohnathonKoster will this fix my use case 馃憖 Or is it for a different case?

I may have missed a discussion somewhere - do you have a quick overview or link about your use case?

Sorry lol, will I be able to use this tag for this use case here ?

Oh that one (been a crazy week and forgetting things)! I think that use-case will be better solved by updates to that package instead (hoping to set some time aside this weekend and work through some of those) :)

@lokmanm
Copy link
Contributor

lokmanm commented Sep 14, 2023

@JohnathonKoster Nah no worries, I was just wondering because I saw the tag. Thanks 馃憤

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.

None yet

3 participants