Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,
I have a form and i want to redirect to a snippet file after submit. I know it must be something silly, but i can't figure out the correct url for this file.
I would appreciate your help!

Code: Select all
<!--If form succes-->
<cms:if k_success >
       <cms:set email_from='office@e-san.ro' />   
            <cms:set email_bcc='florentina.antoniu@gmail.com' />   
            <cms:set email_subject='Comanda Esan Jewelery Creations' />
            <cms:set email_debug='1' />
         
         <cms:if (frm_method = '<span>Plata la livrare</span>') >
            <cms:embed 'sales_email_livrare.html' />
            <cms:redirect url="<... my_snippet_file.html" />" />
         </cms:if>

        </cms:if>


Thank you :)
Hi,

Snippets are not supposed to be accessible via a browser - only the 'templates' (you see listed in admin sidebar) are.

So, instead of trying to redirect directly to a snippet, you should register a new template, embed the snippet into it and then redirect to the template instead. This way you'll execute the snippet through the template.

Hope it helps.
Thank you for your answer!
i thaught of that too.
Is there a way to create a template and not appear in admin panel? considering that it has no edit parts?

Thanks!
You can try setting the 'hidden' parameter of <cms:template> tag to '1' e.g. as follows -
Code: Select all
<cms:template hidden='1'>

</cms:template>

This way the template will not be shown to anyone but the super-admin in the admin-panel. Super-admin will see the template's name with a strike-through to indicate that it is a template hidden to everybody else.

Hope it helps.
Great! Thank you!
5 posts Page 1 of 1