felted

How can I output the title from an Options Fieldtype inside an repeater?

Recommended Posts

Hello,

I am new here and have a question :)
Sorry for my bad english.

how can I output the title from an Options Fieldtype inside a repeater?

This is my Backend:
repeater.thumb.jpg.94d1572c9e7c931d61d24d7dffd07ad0.jpg

And this is the code:

// This site is a onepager
$portfolio = $pages->get('/Portfolio/');
echo "title: ".$portfolio->repeater_portfolio[0]->Category_repeater1037->title;


Unfortunately I cant get any output.

Can anyone help me?

Thanks, Felted

Share this post


Link to post
Share on other sites

You need to remove the id suffix. This one works in my setup

// This site is a onepager
$portfolio = $pages->get('/Portfolio/');
echo "title: ".$portfolio->repeater_portfolio->first->Category_repeater->title;

 

Share this post


Link to post
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


  • Recently Browsing   0 members

    No registered users viewing this page.