<if-exists> execute a block if an object exists in the database

name
if-exists
xml namespace
http://moyaproject.com/db

Execute the enclosed block if a object exists in the db.

Example

<db:if-exists model="#Link" let:topic="topic" let:slug="slug" >
    <forms:error>Slug exists, please edit the title</forms:error>
    <break/>
</db:if-exists>
attributes
name purpose type required? default choices
db Database text No "_default"
filter Filter expression database expression No
from Application application reference No
model Model text No
modelobj Model object expression No None
inherited attributes
name purpose type required? default choices
if Conditional expression expression No yes