I am trying to get the function ImagesR, which checks for occurrence of any one of three images, to work.
This is what I have in the ss template:
<% if ImagesR %>
<img width="$ImageWidthR" src="<% control ImageR.SetWidth(280) %>$URL<% end_control %>" alt="$AltTextR" title="$TitleTextR" />
<img width="$ImageWidthR" src="<% control ImageR2.SetWidth(280) %>$URL<% end_control %>" alt="$AltTextR2" title="$TitleTextR2" />
<img width="$ImageWidthR" src="<% control ImageR3.SetWidth(280) %>$URL<% end_control %>" alt="$AltTextR3" title="$TitleTextR3" />
<div class="caption"><p><i>$CaptionR</i></p></div><% end_if %>
<% end_if %>
This is what I have in Page.php
class Page_Controller extends ContentController {
...
function ImagesR() {
return ($this->ImageR || $this->ImageR2 || $this->ImageR3 );
}
It doesn't work. It works if I pass non-image arrays (e.g., $this->CaptionR), but not apparently with images.
Is there a trick for creating an OR function for images (e.g., class Page_Photo extends Image)?
I don't get it?
Sam