Developer forum

Forum » CMS - Standard features » RE: Snippets - tag not working inside snippet

RE: Snippets - tag not working inside snippet

Hans Ravnsfjall
Reply

Hi

I have a snippet that I try to use to move something from the bodytext section to the footer.

 

the snippet looks like this

<!--@SnippetStart(SpyrBaraNews)-->
<!--@Global:Paragraph.Content(<!--@News:Spyr_Bara_ID-->)-->
<!--@SnippetEnd(SpyrBaraNews)-->

 

and the place where I am moving this to has this code

 <!--@Snippet(SpyrBaraNews)-->

 

It works to move the content to the correct place, but the Tag is not being parsed. So i only get a <!--@Global:Paragraph.Content(4713)--> outputtet in the plase of the snippet.

 

Does it not work to use Tags inside a snippet, or is it perhaps a version problem?

Last, but not least - does anybody have any suggestion for another solution to this?

The page where I use this is here http://www.nema.fo/Loysnir.aspx?ID=984&Action=1&NewsId=1202&currentPage=2&PID=3291

and it is running on a 8.2.3.2

 


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

Does it work if you (for testing purposes) hardcode the paragraph id in Global:Paragraph.Content? If the paragraph is a global paragraph then it will not work (this was registered as a bug many years ago, but has been rejected due to the complexity of the fix and the possible implications).  

What are you trying to do? As you hint, there may be better ways to do it.

Best regards,
Mikkel

Votes for this answer: 1
 
Hans Ravnsfjall
Reply

Hi Mikkel

You are the King!

Problem was that the paragraph is a global element. I copied the paragraph, and detached it as a global element, and now it works perfectly :)

 

thank you very mutch

 

You must be logged in to post in the forum