[Solved] Conditional Content and Meta Refresh not working
Posted: Tue May 03, 2011 1:00 am
I have a site that passes an outbound link through a redirect page so I can track (with Google Analytics) hits to a sister site. Sometimes the sister site is unavailable. I would like to make an EAS (Emergency Alert System of sorts) based on a news article. Basically if the article is active, then display the article, if not then redirect as normal. I do not want to use a js redirect because I need this to work with the most basic of dependencies . . .
My problem is: the conditional statement recognizes when an article is present and displays content accordingly, but when it is absent nothing gets displayed - not even the alternate content.
My problem is: the conditional statement recognizes when an article is present and displays content accordingly, but when it is absent nothing gets displayed - not even the alternate content.
Code: Select all
<!-- pageAttribute: NotSearchable -->
{process_pagedata}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<__html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex,nofollow">
{capture assign='EAS_Redirect' name='EAS_Redirect'}
{cms_module module='news' category='Ticketing-EAS' summarytemplate='EAS' number="1"}
{/capture}
{if !empty($EAS_Redirect)}
<!--No Redirect-->
{else}
<!--This is simply an intermediate page to allow us to count hits to the ticketing system.-->
<meta http-equiv="REFRESH" content="0; url=https://sister-site">
{/if}
</head>
</__body>
{capture assign='EAS_Content' name='EAS_Content'}
{cms_module module='news' category='Ticketing-EAS' summarytemplate='EAS' number="1"}
{/capture}
{if !empty($EAS_Content)}
{$EAS_Content}
{else}
Please wait while ticketing loads . . .
<!--
{content}
-->
{/if}
{global_content name='analytics'}
<__body>
</__html>