Hi DV0007, Thanks for getting in touch about this. There are several ways you could do this. The easiest is probably to do something along the following lines
{exp:channel:entries channel="pages"}
{!-- Please note the channel name above will have to be the one you are using --}
{if '{file_field}' != ''}
{!-- This means we have the file field for this entry --}
{file_field}
{if:else}
{!-- open channel entries loop along the following lines ..
I'd generally put this in an embed to keep things clean
If you went that route you would use something like
{emebd="_embeds/page_1_image" entry_id_of_page_1="{passed in entry ID}"}
--}
}
{exp:channel:entries channel="pages" dynamic="no" entry_id="{entry_id_of_page_1}"}
{!-- Please note, the {entry_id_of_page_1} is a placeholder --}
{file_field}
{/exp:channel:entries}
{/if}
{/exp:channel:entries}
Please note, you could also use the url_title or a few other methods to achieve this.
Thanks,
-Tom Jaeger
Hello, To achieve this functionality where you reference the file field of one page (let’s say page1) on all other pages (page2, page3, page4, etc.) if those pages do not have any value for their file field, you can use a scripting language like PHP along with a database to store and retrieve the file field information.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.