View Single Post
  #1  
Old 03-24-2009, 05:56 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Open a Shadowbox upon entering a page - with a smarty IF

I've blown more than an hour on this... anyone know the trick?

My goal: upon loading a page, use a smarty if to determine if an element should be displayed, then show it, inside a Shadowbox (div/html, iFrame, whatever).

For example, in home.tpl, in the <head>:

Code:
{* SHADOWBOX INCLUDE *} {if $smarty.get.reviewed eq "yes"} {include file="shadowbox_include-review-confirm.tpl" } {else} {include file="shadowbox_include.tpl" } {/if} {* END-SHADOWBOX INCLUDE *}

Then the include would contain the javascript, as detailed from the shadowbox docs.

I know the smarty is good, since it I am using the same if to display text on the page. I'd also like to have it load a shadowbox.

I can get everything done except the autoload of the shadowbox.

I found this post... but I can't make it work.

What's the secret word, or magic handshake?

Thanks,

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote