SOLVED

Re: Can you add a snippet to a template?

Go to solution
Anonymous
Not applicable

Do I have this right? Is there no way to add a snippet to an email (or landing page) template?

Tags (1)
1 ACCEPTED SOLUTION
Josh_Hill13
Level 10 - Champion Alumni

Not that I'm aware of. You would treat the snippet as the "Template" for the intended section of the page or email, like a footer.

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Hi Greg,

Yup! I'm aware of that. I've been doing a lot of that lately. Snippets are cool - especially since Mkto implemented the no draft function.

Thank you!

Denise

Dan_Stevens_
Level 10 - Champion Alumni

Unless, of course, any of these scenarios apply (we did something with the segmentations that is preventing no-draft from working for us):

  • No-Draft will not work if you replace one segmentation with another one in the same snippet. However, No-Draft will work if you change, add, or delete a segment within a segmentation that is referenced in the snippet
  • No-Draft will not work if you add/remove a segmentation to a previously approved snippet
    • By design, No-Draft will fail if you make a dynamic snippet static, or a static snippet dynamic. If your use case requires this scenario, then we recommend you create a new snippet to be used across your assets. If you must update the existing snippet, then you will need to approve it using the Create Draft option, then re-approve the assets using the snippet (in other words, the old behavior)
Grégoire_Miche2
Level 10

Hi Denise,

In emails, any MktoText or mktoEditable (the free text elements in the template) can also be replaced by a snippet:

pastedImage_1.png

-Greg

Dan_Stevens_
Level 10 - Champion Alumni

We create specific elements within our guided LP template to accept snippets at page creation:

pastedImage_0.png

When double-clicking either highlighted area, the "insert snippet" window will appear:

pastedImage_2.png

And your snippet will be added to the appropriate region of the page:

pastedImage_1.png

Patrick_Cava2
Level 2

Hi Dan,

For email templates, I see that you can define a default snippet (e.g. <div class="mktoSnippet" id="unsubscribeFooter" mktoName="Unsubscribe Footer" mktoDefaultSnippetId="12"></div> ). However, this doesn't seem to work on landing page templates. Have you been able to use mktoDefaultSnippetID on your landing pages templates?

Dan_Stevens_
Level 10 - Champion Alumni

This works in guided LPs as well:

<div class="mktoSnippet" id="footerInfo" mktoName="Footer Snippet">ADD FOOTER SNIPPET</div>

Yun_Bai1
Level 4

Thank you Dan.

This is really helpful. I just successfully created the snippet footer on a LP template.

Best,

Becky

Patrick_Cava2
Level 2

That part worked, but it then creates a snippet option in the template. When I try to add a default snippet value (mktoDefaultSnippetID), it doesn't work on landing pages. Perhaps the default value only works in email?

Dan_Stevens_
Level 10 - Champion Alumni

See my post above.  When you double-click on the snippet element on the right, the insert snippet window should pop-up - where you then select the appropriate snippet.

Anonymous
Not applicable

Hi Dan - That seems like a good solution. Thank you.

Josh_Hill13
Level 10 - Champion Alumni

Not that I'm aware of. You would treat the snippet as the "Template" for the intended section of the page or email, like a footer.