Is it possible to have a user enter a snippet into a channel entry? I tried, but it doesn’t seem to parse. Maybe I’m doing something wrong?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 25, 2010 4:31pm
Subscribe [1]#1 / Mar 25, 2010 4:31pm
Is it possible to have a user enter a snippet into a channel entry? I tried, but it doesn’t seem to parse. Maybe I’m doing something wrong?
#2 / Mar 25, 2010 4:34pm
Snippets are intended for use in templates, not in entries. What is the code in your snippet?
#3 / Mar 25, 2010 4:41pm
<div id="flashcontent">
<!-- Insert non-Flash content here -->
</div>
[removed]
var flashvars = {
xmlfile: "{embed:ssp_slideshow}",
xmlfiletype: "Director" }
var params = {
base: ".",
allowfullscreen: "true"
}
var attributes = {
id: "flashcontent"
}
swfobject.embedSWF("{site_url}assets/includes/ssp-ee-blogs.swf", "flashcontent", "560", "365", "9.0.0", false, flashvars, params, attributes);
[removed]This is the code. The idea is for users entering content to be able to place a SlideshowPro slideshow in the content without having to know exactly how to do it. For content providers being told “enter {blog_slideshow} wherever you want your slideshow to appear” is easier than saying “type in all this stuff…”
The whole process is:
1. On the channel entry page, there is a field to paste in the XML path to our SlideshowPro director album
2. The template checks to see if that field is empty, if it’s not, it loads the SWFObject javascript in the page header, then (ideally) it would populate the flashvars above.