A link between two pages and their children

What I enter in my panel and I want to catch you mean ?

No, I want to see what is in your content file in the link field (your_template_name.txt), after you saved. it through the Panel, this is an example result from one of my projects:

footermenu: contact, imprint, privacy

Your $resultarray doesn’t have a named key, so I’m not sure what this stores, maybe the UID, maybe something else. But if the page is not on the first level, we need the URI to fetch the page.

I have that in one of my project.txt

Title: Cygnes


Year: 2014


Client: anon


Autoid: 81f03bbe8e098cfda42c73d16337d377




Mounth: Jully


Height: 15


Width: 20

Hm, that’s not much.

But first of all, I can’t see a link. field, I guess the field you. want. here is relatedprojects, but that field is empty. I suggest you first of all adapt your plugin to store either the URI or the Autoid. If you store the URI, you. can use the pages() method to get the pages, if you store the Autoid (makes more sense if the pages are later renamed), then you have. to filter the pages by autoid

// using the URI
foreach ($projects->children()->visible() as $user) {
      $result[$user->uri()] = $user->title() . ' • ' . $user->year() . ' • ' . $user->mounth();
//this works with the pages method from above

// using the autoid
foreach ($projects->children()->visible() as $user) {
      $result[$user->autoid()] = $user->title() . ' • ' . $user->year() . ' • ' . $user->mounth();
//if you store the Autoid, you have to do this to get the related pages in your template
$relatedPageLinks = $page->relatedprojects()->split(',');
$relatedPages = page('projects')->filterBy('autoid', 'in', $relatedPageLinks);

Ok, for a project, using uri() it goes from that before

Link: 0, 3, 4

To that

Link: blog/chene-des-marais, blog/erable-pommele, blog/merisier

That looks better now. Still wondering. where that field was before, because what. you showed above didn’t have a link field. Then now the code from above. with


should work?