Created
May 31, 2011 18:04
-
-
Save marcoscoelho/1000987 to your computer and use it in GitHub Desktop.
Using plugin theme to generate an image optional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Image traditional | |
{pyro:theme:image file="icons/{pyro:module_details:slug}.png" base="path"} | |
<?php | |
echo 'html_img_open' . 'path' . 'file' . 'html_img_close'; // image tag | |
?> | |
Image optional using the attribute: 'base="path?"' | |
{pyro:theme:image file="icons/{pyro:module_details:slug}.png" base="path?"} | |
<?php | |
if (is_file('file')) : | |
echo 'html_img_open' . 'path' . 'file' . 'html_img_close'; // image tag | |
else: | |
echo ''; // empty string | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment