Jump to content

Getting checked pages in field


Recommended Posts

Hi everyone,

I am sorry if this question is somewhere in the forums already, but I've passed my last hour searching for it's answer and I couldn't find it.

The problem is the following:

I have a Checkbox Page Field inside a Repeater Field. Basically, what I need is to get the title of the selected page(s) in that item. I've tried the following:

<?php foreach($page->banners as $banner) { // cycles through repeater items

What can I do?

Link to comment
Share on other sites

You also have to iterate the pages inside the page field

foreach($page->banners as $banner) {
foreach($banner->pagefield as $p) {
	echo $p->title;
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...