Else statement in template
-
I have a template as follows:
[if active] <div class="home-container"> <h2 style="display:inline-block">{@post_title}</h2> - <h4 style="display:inline-block; color:#B74D5B">{@home_category}</h4> {@post_thumbnail.large} {@post_content} <p>Posted: {@post_date, post_date}</p> </div> [else] <h3>No homes available</h3> [/if]
So this will check if the post has a custom field named active set to true and if so display the post. But if it does not then show the message ‘no homes available’.
Problem is, the message is being outputted one time per post. Here is the URL: https://towneplacehoa.com/sales-and-rentals/
What am I doing wrong here. Any help is appreciated. Thanks for your help!
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Else statement in template’ is closed to new replies.