{if isset($smarty.server.HTTPS)} {$scheme = "https://"} {else} {$scheme = "http://"} {/if}