stacey icon indicating copy to clipboard operation
stacey copied to clipboard

having a problem with "if !@thumb do..."

Open adriencater opened this issue 13 years ago • 1 comments

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

adriencater avatar Nov 28 '11 10:11 adriencater

Do you still need help with this?

desbest avatar Apr 18 '20 00:04 desbest