Quantcast
Channel: OXID Community Forum
Viewing all articles
Browse latest Browse all 6951

getPictureUrl() check if result is "nopic"

$
0
0
Hello,

At the moment I try to implement a little feature in the article (list.tpl > listitem_infogrid.tpl) from Azure.

I do this:

Code:

[{if $product->getPictureUrl(2) }]
        [{assign var="bigImageUrl" value=$product->getPictureUrl(2)}]
[{else}]
        [{assign var="bigImageUrl" value=$product->getPictureUrl()}]
[{/if}]

In hope to check if a second picture was defined and if so, to put the url of this picture in "$bigImageUrl". Like you maybe know by now, getPictureUrl() is always returning a url string. If an image does not really exist (just the "no-pic" placeholder) it returns the url to the placeholder.

Is there an equivalent method to get a picture Url or at least a method i can use to check if an image is not a placeholder? To compare the url against a String (if contains "nopic"...) seems very dirty.

Thank you very much.

Viewing all articles
Browse latest Browse all 6951

Trending Articles