0

Here's partial template:

<a href="{{ url('videos') }}">
    <h6 class="borbottom text-uppercase"><i class="fab fa-youtube"></i> Serke TV</h6>
</a>

{% for p in page.find('/videos').children if p != page %}
  <h3>{{ p.title }}</h3>
{% endfor %}

I have videos route, that displays all his child elements. I want to display all videos (child elements) in a block as partial template, which i certain pages.

However that page.find() nor page.collection('videos') not working for me.

Alexander Kim
  • 17,304
  • 23
  • 100
  • 157
  • What is this partial template in? Why not use a collections setup similar to the blog in the example template? – Jacobm001 Mar 28 '18 at 19:34
  • `page.find()` should only be able to pull up subpages, right? I think you need to run that against pages. – Jacobm001 Mar 29 '18 at 03:07

1 Answers1

0

You are using page object which is the current page. So you are looking for videos pages in the current page.

You need to use pages object to be able to search in all pages. You can see the functions you can use with this object here

Hung Tran
  • 790
  • 2
  • 8
  • 24