I am really stumped.
I am callling a partial with:
{{ partial “semantic/jsonld/jsonld-person.html” (dict “context” . “person_id” .Params.id )}}
and within the partial "jsonld-person.html I have the following code:
{{ $context := .context }}
{{ $person_id := .person_id }}
{{ $person := (index $context.Site.Data.person $person_id) }}
<script type="application/ld+json">
{
"@context": "http://schema.org"
,"@type": "Person"
{{ with $person.email }},"email" : "{{ . }}"{{ end }}
{{ with $person.image }},"image" : {{ partial "semantic/rdf/rdf-image.html" $person.image }}{{ end }}
}
</script>
I am getting an error message telling me that $person_id in the index call is nil.
If I use a hard set string value, it works.
The output of {{ $person_id }} gives me a string value.
Any help or tips would be appreciated!
Randy