Page 1 of 2

{literal} Tag Question [SOLVED]

Posted: Wed Feb 16, 2011 11:14 pm
by mtnmchgrl
Hi. I'm running CMS Made Simple v. 1.9.2.

I created a rotating slideshow using jQuery's crossSlide code and put it on the home page within {literal} tags. That was the only way I could get it to show up correctly.

The problem is...when I am in the WYSISYG part of Content->Pages->Home, the literal tags LITERALLY show up ;)

I've attached a picture of what it looks like
Image

& here is the code for that page (the slideshow code):

Code: Select all

<!-- Javascript Slideshow --> 
{literal}
<__script__ src="scripts/jquery-1.5.min.js"></__script>
<__script__ src="scripts/jquery.cross-slide.js"></__script>
<__script__ type="text/javascript">// <![CDATA[
  $(function() {
    $('#slideshow').crossSlide({
      sleep: 3,
      fade: 2
    }, [
      { src: 'crossSlide/1.jpg' },
      { src: 'crossSlide/2.jpg' },
      { src: 'crossSlide/3.jpg' },
      { src: 'crossSlide/4.jpg' }
    ])
  });
// ]]></__script>
{/literal}    <!-- End Slideshow Script-->
<h2 style="text-align: center;">Welcome!</h2>
<!-- Slideshow Code - DO NOT EDIT! -->
I'm worried that when I turn this over to the site editor, they might make the tags go bye-bye & may cause issues.

Re: {literal} Tag Question

Posted: Thu Feb 17, 2011 1:13 am
by Dr.CSS
You should put it in the metadata box in Options...

Re: {literal} Tag Question

Posted: Thu Feb 17, 2011 1:50 am
by mtnmchgrl
Dr.CSS wrote:You should put it in the metadata box in Options...
I put the whole block of code {literal} all my jquery code {/literal} into that box you mentioned but it's not showing up....
Any other theories?

Re: {literal} Tag Question

Posted: Thu Feb 17, 2011 6:18 am
by Dr.CSS
You put it in the Option tab of the page you are editing and it doesn't show in the page view source?...

Re: {literal} Tag Question

Posted: Thu Feb 17, 2011 6:51 am
by Jos
Do you have the {metadata} tag in your templates?

Re: {literal} Tag Question

Posted: Thu Feb 17, 2011 7:46 pm
by Dr.CSS
Good catch Jos, it does help to have that in the template if you want anything from them to show up... ;)

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 6:15 pm
by mtnmchgrl
Dr.CSS wrote:You put it in the Option tab of the page you are editing and it doesn't show in the page view source?...
Yes, that is correct.

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 6:16 pm
by mtnmchgrl
Jos wrote:Do you have the {metadata} tag in your templates?
Yes, I do. :)

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 6:16 pm
by mtnmchgrl
Any other theories?

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 6:36 pm
by Jos
I guess not... It should work if you have put your code in the Page Specific Metadata field under the Options tab

{literal} tags being visible in TinyMCE-editor is normal behaviour.

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 7:00 pm
by mtnmchgrl
Jos wrote:I guess not... It should work if you have put your code in the Page Specific Metadata field under the Options tab

{literal} tags being visible in TinyMCE-editor is normal behaviour.
And now what is weirder, when I moved it BACK to the home page's (by turning off WYSIWYG editor), the slideshow doesn't show up at all.... just the h2 text.

:(

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 7:33 pm
by mtnmchgrl
Another thought....

Besides making sure I have the {metadata} tags in my template....is there anything else that should be on that related to the jquery?? I mean...normally you call the jquery in the header tags, but in this instance it's over w/the cross slide stuff in the meta data options box.

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 8:45 pm
by Dr.CSS
This is very strange that it isn't working for you, you should have only one {metadata} tag in the <head> of your template, look at the default templates to see how it looks, try using one of the default templates to see if the page specific metadata shows up in the head...

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 9:08 pm
by Jos
I wouldn't mind looking into it for you if you just pm an admin login

Re: {literal} Tag Question

Posted: Fri Feb 18, 2011 9:18 pm
by mtnmchgrl
Could it have anything to do with The [CDATA} usage??

Page Specific Metadata box....

Code: Select all

{literal}
<__script__ src="scripts/jquery-1.5.min.js"></__script>
<__script__ src="scripts/jquery.cross-slide.js"></__script>
<__script__ type="text/javascript">
// <![CDATA[
      $(function() {
        $('#slideshow').crossSlide({
          sleep: 3,
          fade: 2
        }, [
          { src: 'crossSlide/1.jpg' },
          { src: 'crossSlide/2.jpg' },
          { src: 'crossSlide/3.jpg' },
          { src: 'crossSlide/4.jpg' }
        ])
      });
// ]]></__script>
{/literal}    
The only thing else related to the slide show at this point that I within my template is the {metadata} tag in the header.