Cannot publish Snippet Templates with Velocity Code

Dear Colleagues

I decided to break the global template into multiple Snippets being referenced by a certain Navigation Slot. Those snippets are the shared templates that contain certain HTML for headers, footers, etc and reference NavTree and Navon Content Types. They work fine during the preview and publishing without the velocity code in them. Buth WITH the velocity code they only work in the preview.

After they are published I get an error message


Problem assembling output for item (name=“M Root”, id=3-101-895) with template: MYSnUpperFooter. Underlying error: Could not locate the default template for content at path //Sites/M/M Root with content type 315 because no templates associated with this content type. See log for stack trace.

I am not really sure how to debug it since Content Item with ID 315 (NavTree) has multiple associated templates

Can it be a bug?

Thank you for your generous help

I found the solution. I simply didn’t know that I had to put the name of an associated Snippet into $rx.location.generate function