Block to Format not working right
Ok so I have a block that views right inside cascade (when viewing the block itself) - when I add it to the page, it doesn't display correctly anymore - it just displays some of the text in the different divs, but doesn't show the images and such
here is the block
<link type="text/css" rel="stylesheet" href="http://www.jsu.edu/_common/_files/scripts/kenburns/kenburns.css" />
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans" />
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:400,700,700italic" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script type="text/javascript" src="http://www.jsu.edu/_common/_files/scripts/kenburns/jquery-ui-1.8.16.custom.min.js">
</script>
<script type="text/javascript" src="http://www.jsu.edu/_common/_files/scripts/kenburns/jquery.ui.touch-punch.min.js">
</script>
<script type="text/javascript" src="http://www.jsu.edu/_common/_files/scripts/kenburns/bannerscollection_kenburns.js">
</script>
<!--[if IE]>
<script src="js/excanvas.compiled.js" type="text/javascript"></script>
<![endif]-->
<!-- must have -->
<script type="text/javascript">
jQuery(function() {
jQuery('#bannerscollection_kenburns_generous').bannerscollection_kenburns({
skin: 'generous',
responsive:false,
width: 700,
height: 207,
width100Proc:false,
numberOfThumbsPerScreen:5,
thumbsOnMarginTop:14,
thumbsWrapperMarginTop: -110,
autoHideBottomNav:true
});
});
</script>
<div id="bannerscollection_kenburns_generous">
<div class="myloader"></div>
<!-- CONTENT -->
<ul class="bannerscollection_kenburns_list">
<li data-text-id="#bannerscollection_kenburns_photoText1" data-initialzoom="1" data-finalzoom="1.5" data-bottom-thumb="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/thumbs/mba.jpg"><img width="700" src="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/mba.jpg" height="207" /></li>
<li data-verticalposition="center" data-text-id="#bannerscollection_kenburns_photoText2" data-target="_blank" data-link="http://codecanyon.net/user/LambertGroup" data-initialzoom="1" data-horizontalposition="right" data-finalzoom="1.3" data-bottom-thumb="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/thumbs/edu.jpg"><img width="700" src="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/edu.jpg" height="207" /></li>
<li data-verticalposition="bottom" data-text-id="#bannerscollection_kenburns_photoText3" data-initialzoom="1" data-horizontalposition="right" data-finalzoom="1.2" data-bottom-thumb="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/thumbs/em.jpg"><img width="700" src="http://www.jsu.edu/_common/_files/system/college_rotate/graduate-studies/em.jpg" height="207" /></li>
</ul>
<!-- TEXT -->
<div id="bannerscollection_kenburns_photoText1" class="bannerscollection_kenburns_texts">
<div data-initial-top="15" data-initial-left="0" data-final-top="25" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0.5" class="bannerscollection_kenburns_text_line textElement31_generous">Expand Your Career</div>
<div data-initial-top="140" data-initial-left="10" data-final-top="65" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0" class="bannerscollection_kenburns_text_line textElement32_generous">Get a Masters of Business Administration</div>
<div data-initial-top="2" data-initial-left="370" data-final-top="100" data-final-left="50" data-fade-start="0" data-duration="0.5" data-delay="0.8" class="bannerscollection_kenburns_text_line textElement12_generous"><span style="color: #000;">»</span> <a href="http://www.jsu.edu/graduate2/programs/businessadmin/index.html">Learn More</a></div>
</div>
<div id="bannerscollection_kenburns_photoText2" class="bannerscollection_kenburns_texts">
<div data-initial-top="15" data-initial-left="0" data-final-top="25" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0.5" class="bannerscollection_kenburns_text_line textElement31_generous">Change the World</div>
<div data-initial-top="140" data-initial-left="10" data-final-top="65" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0" class="bannerscollection_kenburns_text_line textElement32_generous">We have many Educational Specialist programs</div>
<div data-initial-top="2" data-initial-left="370" data-final-top="100" data-final-left="50" data-fade-start="0" data-duration="0.5" data-delay="0.8" class="bannerscollection_kenburns_text_line textElement12_generous"><span style="color: #000;">»</span> <a href="http://www.jsu.edu/graduate2/programs/emergencymgt/index.html">Learn More</a></div>
</div>
<div id="bannerscollection_kenburns_photoText3" class="bannerscollection_kenburns_texts">
<div data-initial-top="15" data-initial-left="0" data-final-top="25" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0.5" class="bannerscollection_kenburns_text_line textElement31_generous">Save Lives & More</div>
<div data-initial-top="140" data-initial-left="10" data-final-top="65" data-final-left="20" data-fade-start="0" data-duration="0.5" data-delay="0" class="bannerscollection_kenburns_text_line textElement32_generous">Get a Doctorate in Emergency Management</div>
<div data-initial-top="2" data-initial-left="370" data-final-top="100" data-final-left="50" data-fade-start="0" data-duration="0.5" data-delay="0.8" class="bannerscollection_kenburns_text_line textElement12_generous"><span style="color: #000;">»</span> <a href="http://www.jsu.edu/graduate2/programs/emergencymgt/index.html">Learn More</a></div>
</div>
<div data-initial-top="35" data-initial-left="550" data-final-top="35" data-final-left="70" data-fade-start="0" data-duration="0.5" data-delay="0.5" class="bannerscollection_kenburns_text_line textElement31_generous">Responsive<br />
design</div>
<div data-initial-top="140" data-initial-left="10" data-final-top="140" data-final-left="73" data-fade-start="0" data-duration="0.5" data-delay="0" class="bannerscollection_kenburns_text_line textElement32_generous">Available parameter<br />
to disable responsive behaviour</div>
<div data-initial-top="2" data-initial-left="308" data-final-top="23" data-final-left="308" data-fade-start="0" data-duration="0.5" data-delay="0.8" class="bannerscollection_kenburns_text_line textElement33_generous"><a target="_blank" href="http://codecanyon.net/user/LambertGroup">YES!</a></div>
</div>
and here is the format
#set ($data = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/content"))
#set ($content = $_XPathTool.selectSingleNode($data, "main-content"))
#set ($banner = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/content/image"))
#set ($bannerImage = $_XPathTool.selectSingleNode($contentRoot, "/system-index-block/calling-page/system-page/system-data-structure/content/image/link").value)
#set ($imageBlock = $_XPathTool.selectSingleNode($data, "image-block"))
#if ($banner.getChild("path") && $banner.getChild("path").value != "/")
<div class="no_print">
<img src="${banner.getChild("link").value}"/>
</div>
#end
#if ($imageBlock.getChild("path").value != "/")
<div class="body_text">
$_SerializerTool.serialize($imageBlock.getChild("content"), true)
</div>
#end
any help would be appreciated!
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 29 Oct, 2012 07:23 PM
Hi Graham,
Would you also be able to provide the XML of your page's Data Definition and if this block is a structured data block, the XML for the block's Data Definition?
This should help get some more context on how things are set up.
Thanks
2 Posted by Graham Lewis on 29 Oct, 2012 07:34 PM
Sure!
here is the XML of the block
If I'm thinking of the right term, it's not a structured data block, it's XHTML.
here is the XMl of the page
3 Posted by Ryan Griffith on 29 Oct, 2012 08:11 PM
Hi Graham,
It looks like the Xpath for the
$imageBlock
variable is not grabbing grabbing the node you need.If you would like to keep the
$imageBlock
Xpath the same, you'll need to adjust$data
to:Note: you will need to adjust the other variables using
$data
in their Xpath call.Otherwise, you can adjust the Xpath for
$imageBlock
to something like the following:Note: if there are multiple image-block choosers, this will return all of them.
Please let me know if you have any questions.
Thanks
4 Posted by Graham Lewis on 29 Oct, 2012 08:15 PM
Tried that and I get the same thing. Here are two screen shots of what I'm seeing. That might make it make a bit more sense.
5 Posted by Ryan Griffith on 29 Oct, 2012 08:19 PM
Hm, It's definitely pulling in the content. Have you check for any JavaScript error(s)? It almost appears as though the slideshow isn't loading properly so you're just getting a dump of the content within the block.
6 Posted by Graham Lewis on 29 Oct, 2012 08:21 PM
Forgive my ignorance haha - how do I check for Javascript errors? If you want to look at the page it's www.jsu.edu/graduate2
7 Posted by Graham Lewis on 29 Oct, 2012 08:41 PM
Ok, so looking at it - the text that is showing didn't need to be there so I deleted it - now nothing is showing up. I used firebug and it seems that the code is there but in firebug is grayed out almost like it's "commented" out
8 Posted by Ryan Griffith on 29 Oct, 2012 08:45 PM
There's definitely a JavaScript error:
I copied things locally and it appears that the additional loading of jQuery below the slideshow is affecting things, maybe the plugin isn't being loaded or registered properly. because of this. I removed this extra jQuery script tag and it seemed to work:
Note: It looks like you are loading jQuery 3 or so times, I would recommend looking into reducing this to try and reduce any future issues.
9 Posted by Graham Lewis on 29 Oct, 2012 08:49 PM
Dang it if that didn't work, we def need to go through all of our scripts and consolidate. That will prob be my goal this week. Thanks for the help!
10 Posted by Ryan Griffith on 30 Oct, 2012 12:01 PM
Glad we got that figured out, Graham.
Have a great day!
Ryan Griffith closed this discussion on 30 Oct, 2012 12:01 PM.