Forum

Thread tagged as: Question

Allow user to link pages, and use attributes from linked page

Hello,

Is there a method to provide the user with a drop down menu of pages available in the site.

I would like the user to be able to link a news story to an existing page, and the news template to draw in perch:pages attributes from the selected page.

Tony Astley

Tony Astley 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's essentially two questions. The first, yes, you can use the pagelist field type.

Secondly, you need to use the navigation functions to access page attributes from a different page.

pagelist shows a text field, I'm assuming this requires the pagelist add on. I've downloaded the add on but can't locate any documentation about what it can and can't return once a page has been selected.

I've installed it and it's actually a very easy class to modify to make other page attributes available for output.

Got it working almost perfectly now... Last question on this matter:

Is it possible to limit the options shown in the pagelist select menu to a certain section of the site, something similar to using from-path on a nav.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not built in, but it would be possible to modify to do that, yes.