Friday 10 August 2012 4:15:21 pm - 9 replies
Please help with this project, I am trying to overwrite an extension pagelayout.tpl from placing the shadowbox code in <head> and everything goes blank.
Saturday 11 August 2012 2:04:29 am
There are a few mistakes that can lead to a blank page, and lacking enough detail to isolate one, I'm going to suggest what I find to be the most common: Leaking a curly brace "{" or "}" from your javascript into the regular template language context. In other words, javascript that includes curly braces needs to be enclosed in {literal} {/literal} or individual curly braces need to be replaced with {rdelim} or {ldelim}.
See: http://doc.ez.no/eZ-Publish/Techn.../4.x/Templates/The-template-language
Sunday 12 August 2012 2:15:25 pm
Greetings good friends
Well, the extension works, but now the window is all fronpage how do I only look at the homepage and not the other?
this is the method that:
create a file named page_shadowbox.tpl pagelayout.tpl and insert it into this:
<head> {def $basket_is_empty = cond( $current_user.is_logged_in, fetch( shop, basket ).is_empty, 1 ) $user_hash = concat( $current_user.role_id_list|implode( ',' ), ',', $current_user.limited_assignment_value_list|implode( ',' ) )} {include uri='design:page_head_displaystyles.tpl'} {if is_set( $extra_cache_key )|not} {def $extra_cache_key = ''} {/if} {cache-block keys=array ( $module_result.uri, $basket_is_empty, $current_user.contentobject_id, $extra_cache_key )} {def $pagedata = ezpagedata() $pagestyle = $pagedata.css_classes $locales = fetch( 'content', 'translation_list' ) $pagedesign = $pagedata.template_look $current_node_id = $pagedata.node_id} {include uri='design:page_head.tpl'} {include uri='design:page_head_style.tpl'} {include uri='design:page_head_script.tpl'} {include uri='design:page_shadowbox.tpl'} </head>
Modified on Sunday 12 August 2012 10:02:07 pm by Edixon Rivera
Monday 13 August 2012 1:25:02 pm
You have posted the code from your pagelayout.tpl. What code have you got in page_shadowbox.tpl?
If you are just looking for a modal, you could also try:
http://projects.ez.no/ezlightbox
http://projects.ez.no/lezcolorbox
Monday 13 August 2012 1:33:21 pm
this is code:
{literal}
<link href="stylesheets/shadowbox.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="javascript/jquery-1.js"></script>
<script type="text/javascript" src="javascript/shadowbox.js"></script>
<script type="text/javascript"> Shadowbox.init({ language: "es", players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'] }); </script>
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function() {
Shadowbox.open({
content: '<div id="welcome-msg"><h1>BIENVENIDOS-WELCOME</h1></div>',
player: "html",
title: "",
width: 492,
height: 317
});
}, 50);
});
</script>
</style>
{/literal}
Tuesday 14 August 2012 11:03:11 pm
Thanks Edixon. So your code is working now, yes? I'm not clear on what you want to happen. Are you wanting the modal window to appear once the page is loaded? If not, when do you want to see it? What do you want to see in the modal window?
You must be logged in to post messages in this topic!