Do you have some feature in mind that you'd love to see in Couch? Let us know.
2 posts Page 1 of 1
Hi!

I'm going to improve my code. Any missing snippet should not prevent a page from display on production. Some snippet is somehow gone -> site shut down with warning. Usual stuff to overcome this:
Code: Select all
<cms:if "<cms:exists "_languages.html" />" >
  <cms:embed '_languages.html' />
</cms:if>
Or even this way:
Code: Select all
<cms:if "<cms:exists "_languages.html" />" >
  <cms:embed '_languages.html' />
<cms:else />
  <cms:send_mail ... />
</cms:if>

Shouldn't be rocket-science to integrate check into embed.
Code: Select all
<cms:embed_ex 'mysnippet.html' />
or
Code: Select all
<cms:embed 'mysnippet.html' not_found="<cms:abort />" /> <!-- or simply check='1' -->

I ask for such a mod, as i'm not qualified yet to code it myself. 'cms:exists' is only 2 lines, i know. Integrating it to 'embed' scares me too much though.

If anyone finds it useful, please, make your voice heard. It is important, so nobody (esp. @KK) wastes time. If you need it too - let us know. Thanks.

--
For reference: Couch enables us to modify any tag, using methods described here:
viewtopic.php?f=3&t=9826
viewtopic.php?p=22187#p22187
viewtopic.php?p=22294#p22294
--
Emm.. Need to make it clearer.
I want no errors or warnings if snippet is not found. A parameter would help, like check='1' or check='0'. Action on 'not found' can be present or not. This is an optional last-minute idea.
2 posts Page 1 of 1
cron