URL Exists

3rd Party (Free)

79 downloads (last 90 days)

MIT License Download v1.0

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

This script allows you to check to see if a resource URL exists. It returns a value of "yes" or "no". A common use of this plugin would be to check if an external resource exists within a conditional to set up an alternative if the resource comes back with a 404.

This script allows you to check to see if a resource URL exists. It returns a value of “yes” or “no”. A common use of this plugin would be to check if an external resource exists within a conditional to set up an alternative if the resource comes back with a 404.

Here’s an example of setting a variable using the plugin syntax

{preload_replace:has_photo="{exp:easy_file_exists url='{photo}'}"}

Then, later in the template:

<img src="{if has_photo='yes'}{photo}{if:else}{default_avatar}{/if}" class="user-avatar" alt="" />

This is extremely useful when the file in question is an external resource as a simple {if photo} will evaluate as “true” if photo has a value, but the conditional does not check against the actual validity of the linked resource.

Download URL Exists

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.0 Mar 21, 2014

This entry was created March 25, 2014, 9:46 am.
This entry was last updated March 25, 2014, 9:48 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!