How can i get page data from a Headless Bundle

#1

Hey all,

so on my home page I am pulling content from across the site that has a particular frontmatter setting. The purpose of this is to have a promo area where we can promote any content from any section so marked. Here’s the code:

  {{ $pages := where .Page.Pages ".Params.homepage" "==" true}}
{{ range  first 4 $pages }}

<div class="home-cta-item">
  <h5>
    <a
      class="link text-black"
      href="{{ if .Params.link }} {{ .Params.link | safeURL }} {{ else }} {{.RelPermalink}} {{end}}"
      {{ if .Params.link }} target="_blank" {{end}}
      >
      {{ .Params.homepageTitle | default .Title}}
      {{ partial "svg/chevron-right" (dict "class" "red" ) }}
    </a>
  </h5>
  {{ .Params.homepageLead | default .Content | safeHTML | truncate 120 }}
</div>
{{ end }}

What I need to do is add a new section to the site that will be Headless (ie no permalinks etc) but include it within this home page section .

This section has the following directory structure:
/content/campaigns/2019/campaign-name

There will of course be multiple entries within the 2019 folder.

Any suggestions?