Forum
perch content custom
Hello
I have a template to display an image and optional text box.
Can I use perch content custom to just pull out the image and display on another page?
My template is...
<perch:if exists="info">
<div class="row purpline">
<div class="col-sm-6 margin-bottom-20">
<img class="img-responsive" src="<perch:content type="image" id="offer" label="Offer Image" order="1" />" /></div>
<div class="col-sm-6 text-left">
<perch:content id="info" type="textarea" label="Optional Info" markdown="true" editor="markitup" order="2"/>
</div></div>
<perch:else/>
<div class="row purpline">
<img class="img-responsive" src="<perch:content type="image" id="offer"/>" />
</div>
</perch:if>
Yes, that's right. You would use a different template that only has the image in.
Sorry could you explain a little more. If I had a different template then how would it pick up image from the above template?
Why would my page function look like?
the documentation for perch_content_custom is here.
https://docs.grabaperch.com/functions/content/perch-content-custom/
You add your template as one of the options. It is all detailed on the documentation page.
If you search the docs for perch_content_custom you will also find videos and so on of how to use the function.