Share » Forums » Setup & design » Section/Else syntax to check if...

Section/Else syntax to check if external file exists

Section/Else syntax to check if external file exists

Tuesday 26 April 2005 10:17:11 am - 2 replies

Author Message

Paul Forsyth

Tuesday 26 April 2005 11:46:33 am

You might need to drop down to php to perform the file check. A small ezoperator might be the easiest approach, allowing you to:

$myfile = "/here/pic.jpg"

{section show=$myfile|file_exists}
Do something
{/section}

You might be lucky and be able to add the function 'file_exists' to template.ini. See the [PHP] group for more details in that ini file.

paul

steve walker

Wednesday 27 April 2005 2:12:22 am

Excellent - thanks Paul.

Steve.

http://www.oneworldmarket.co.uk

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu