kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 132 forks source link

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

Open adriencater opened 12 years ago

adriencater commented 12 years ago

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
desbest commented 4 years ago

Do you still need help with this?