Skip to content

Dynamic injected value doesn't work after upgrading to 3.3.4 #5762

Discussion options

You must be logged in to vote

I wouldn't have thought you could put Antlers in injected variables like that in the first place. I'm surprised it ever worked.

I'd suggest removing that variable and making a tag instead.

<?php

namespace App\Tags;

use Carbon\Carbon;
use Statamic\Tags\Tags;

class TitleAsMonthDay extends Tags
{
    public function index()
    {
        $title = '2020-'.$this->context->get('title');
        return Carbon::parse($title)->format('F j');
    }
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bruceontheloose
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants