{literal} Tag Question [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

{literal} Tag Question [SOLVED]

Post 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.
Last edited by mtnmchgrl on Mon Feb 21, 2011 6:30 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {literal} Tag Question

Post by Dr.CSS »

You should put it in the metadata box in Options...
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {literal} Tag Question

Post 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?...
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: {literal} Tag Question

Post by Jos »

Do you have the {metadata} tag in your templates?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {literal} Tag Question

Post by Dr.CSS »

Good catch Jos, it does help to have that in the template if you want anything from them to show up... ;)
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post 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.
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post by mtnmchgrl »

Jos wrote:Do you have the {metadata} tag in your templates?
Yes, I do. :)
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post by mtnmchgrl »

Any other theories?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: {literal} Tag Question

Post 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.
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post 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.

:(
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {literal} Tag Question

Post 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...
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: {literal} Tag Question

Post by Jos »

I wouldn't mind looking into it for you if you just pm an admin login
mtnmchgrl
Forum Members
Forum Members
Posts: 32
Joined: Sat Jan 29, 2011 3:50 pm

Re: {literal} Tag Question

Post 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.
Post Reply

Return to “Layout and Design (CSS & HTML)”