Forum
Additional fields in gallery
I would like to include some other fields like 'shared content' in my gallery template that are not standard gallery fields and I am trying to see if there work around way of doing this.
I have my output template b_static_image.html and have passed some extra fields through by adding them to image.html template but also want to add some general content that is the same for all images (product descriptions) without having to add it each time I add a new image but also still giving the client the facility to edit.
Tried rescope but that didn't work. Thought using the album description field and pass this through the template but that does not work either. Can this be displayed in my template? It has to be the template rather than the output php page, which is why I am having problems. Any ideas or shall I give up?
Could you put the content in regular content regions and just pass them into the template?
I tried using perch:content but it didn't work. Can I use perch content in a perch gallery template? If so what I am doing wrong?
No, you'd need to create a content region on the page. Return the result to a variable, then pass that into the template.
Can you give me an example please?
In the template:
Thank you very much I give that a go.
Sorry Drew but can I check where this should part should go to create my region...
$region = perch_content('My region', true); PerchSystem::set_var('region_html', $region);
Where do you need it to be?
Well it will be on gallery/image.php which is dictated by template b_static_image.html.
Basically, I have a paypal form on the gallery template page which I want to adapt to editable content to the output to image.php
thank you.
Ok, then place it on
gallery/image.php
.