Forum

Thread tagged as: Question, Problem, Error

Perch CMS - Get first item out of region list

I'm using the Perch CMS to pull through some captions for a bxslider. I currently have 4 taglines. Because I'm using a different image on each bxslider list item I'm wondering if there's a way to pull out a specific index of the array itself.

<ul class="bxslider"> <li> <img src="assets/img/banners/hay-banner.jpg"/> </li> <li> <img src="assets/img/banners/final-farmhouse-banner.jpg"/> </li>
<li> <img src="assets/img/banners/final-tractor-banner.jpg"/> </li> <li> <img src="assets/img/banners/property-owners.jpg"/> </li> </ul>

That's my HTML code currently. And I want to be able to pull the taglines out using

<?php perch_content('Taglines');?>

But obvioulsy that will pull all of the taglines into the title and not just the first tagline for the first <li>, the second tagline for the second <li> tag.

Is there a way to do this within perch? (Ideal output below).

<li> <img src="assets/img/banners/hay-banner.jpg" title="perch_content('Taglines (1))"

Asha170 Beck

Asha170 Beck 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use perch_content_custom() to do that. Use the count option to set how many items you want to return.

https://docs.grabaperch.com/functions/content/perch-content-custom/

Drew McLellan said:

You can use perch_content_custom() to do that. Use the count option to set how many items you want to return.

https://docs.grabaperch.com/functions/content/perch-content-custom/

Thanks for the information. https://www.psiphon.onl

**Marie370 Matthew ** said:

Drew McLellan said:

You can use perch_content_custom() to do that. Use the count option to set how many items you want to return. https://thegadgetwire.com/tencent-gaming-buddy/ https://thegadgetwire.com/tutuapp/ https://thegadgetwire.com/appvalley/ https://docs.grabaperch.com/functions/content/perch-content-custom/

Thanks for the information. You can use perch_content_custom() to do that. Use the count option to set how many items you want to return.