Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hi, just a quick check to confirm that it isn't possible to retrieve in Template A the contents of a repeatable region in Template B using get_custom_field?

I have a list of clients which I'd like to show on various pages across the site. Using cloned pages would do it, but seems overkill for a name and a url. Plus I'd like the ability to drag and drop the order of items.
Perhaps I have an answer - create the 'client' template as cloneable with the repeatable region for name and url.
Hi potato :)

Repeatable-regions are 'composite' fields so, to confirm your doubt, we cannot use cms:get_custom_field to get their values.

However, we can always fetch them using the standard cms:pages method.
For example the following would show the values from a repeatable-region named 'my_clients' defined in a template called 'clients.php'
Code: Select all
<cms:pages masterpage='clients.php' >
    <cms:show_repeatable 'my_clients'>
        <cms:show whatever_region />
    </cms:show_repeatable>
</cms:pages>

You can use the snippet above in any template and it would work just the same as cms:get_custom_field.

Hope it helps.
thanks KK - I just twigged how simple the solution is after posting and reposted! Sorry - my brain got left behind on a beach!
my brain got left behind on a beach!
speaking of which - hope you had a smashing vacation :D
wonderful thanks KK - on the subject of vacations I'm sure you're due a break!
6 posts Page 1 of 1