Link for the photo

Link for the photo for Photos app

Adds a link to each photo

This plugin is a developer tool and is intended for the advanced user. It allows you to create an additional link to the image in the "Photos" application. This, in turn, opens up the possibility of building sliders, carousels, lists with pictures, portfolios, services, and more. A native photo link leads to a page with disabilities, but an additional link can lead anywhere. Including outside of our site.

Immediately after installing the plugin, a form for saving the link will appear in each photo.

To use this link in the design theme, you need to use the helper:

Helpers

{if $wa->photos && class_exists('photosLinkPlugin')}
     {photosLinkPluginHelper::getUrl($photo.id)}
{/if}

where:
$photo.id - id of the desired photo. At the exit, we immediately get the saved link.

{if $wa->photos && class_exists('photosLinkPlugin')}
        {$link = photosLinkPluginHelper::getLink($photo.id)}
{/if}

where:
$photo.id - id of the photo you want.

At the output, we get an array $link

where:
$link.url - Saved link.
$link.target - Target link. It can take two values: "_blank" is a new window, "_self" is your window.

Example

{if $wa->photos && class_exists('photosLinkPlugin')}
     {$link = photosLinkPluginHelper::getLink($photo.id)}
     {if! empty($link)}
        <a href = "{$link.url}" target = "{$link.target}"> There could be a picture or something else </a>
     {/if}
{/if}

Project on github: https://github.com/itfrogs/wa-photos-link
Dear fellow developers, I will be very happy to accept your pull-request if you consider that this project needs some work.