Add front matters variable to Partial

Hello,

I am trying add dynamic variable from post front matters. But i have error that partial is not found. When i debug $datastring i have correct path.

error calling partial: Partial "landingpagesection/critical/" not found

What i am doing wrong?

{{ $data := .Params.criticalCSS }}
{{ $datastring := print "landingpagesection/critical/" $data   }}
{{ $datastring }}

{{ partial $datastring .  }}

Hello it’s difficult to say what’s going on without seeing the source code of your project.

Also see the Requesting Help guidelines.

1 Like