Page-specific data - possible?

The docs on data templates are silent on an obvious question.

How do I use it on a per-page basis rather than template level ?

Sure, if I have a single.html template or whatever, I can do range $.Site.Data.jazz.bass as shown in the docs.

But what if my template is being used to display programmes for events ? Clearly /event/foo/abc needs to display different data from /events/foo/def, even though abc and def will be using the same template ?

Is this even possible in hugo ?

Yes. This is a common approach:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.