Edward Ver Posted October 3 Share Posted October 3 Hi All, I'm still learning PW, and loving it. But, I'm no PHP coder. My Problem is how to output fields from another page inside a repeater. <?php $showcase = $pages->find("template=work_details") ?> <?php foreach($showcase as $showcases): ?> <div> <p class="pb-2 text-left"><?= $showcases->work_hero_subheading ?></p> // This is inside a repeater called "work_hero_repeater" </div> <?php endforeach; ?> But there is no output. Thank you for any help. Link to comment Share on other sites More sharing options...
Gideon So Posted October 4 Share Posted October 4 Hi @Edward Ver Welcome to the forum and the world of ProcessWire. Please try the following code. Please note the comments to see if you get the idea. <?php $showcase = $pages->find("template=work_details") ?> <?php foreach($showcase as $showcases): ?> <div> <?php foreach($showcases->work_hero_repeater as $whr): ?> // You need to loop therough the repeater because repeater is an arrray. <p class="pb-2 text-left"><?= $whr->work_hero_subheading ?></p> // Then call the field in the repeater item as you need" <?php endforeach; ?> </div> <?php endforeach; ?> Gideon 1 Link to comment Share on other sites More sharing options...
Edward Ver Posted October 4 Author Share Posted October 4 Got the idea and it works. Thank you very much! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now