stacey
stacey copied to clipboard
having a problem with "if !@thumb do..."
I'm having a strange problem with the language:
if !@thumb do
Is not working properly
I want to test if projects have @thumbs; and if they do, show them, if they don't, generate them from the first image in the project (using a thumber.php script.)
if @thumb do
stuff...
endif
if !@thumb do
other stuff...
endif
The "if @thumb do" works fine, as expected.
The ! block fails to parse when there is a thumb present: stacey outputs
if !./content/01.projects/01.My-Project/thumb.jpg do
into the HTML stream. On pages where there is no thumb present, the ! operator works fine.
original snippet:
if !@thumb do
<div class="projectThumbnail">
<a href="@url" class="projectThumbnailLink">
foreach $images[:1] do
<img src="thumber.php?img=@url&w=220" alt="" >
endforeach
</a>
</div>
endif
Do you still need help with this?