%%[[if !publish]]%%

            <span>Data Only Displays on Published Page.</span>

 %%[[endif]]%%

%%[[if publish]]%%
        <div class = '%id=classname% '>

    <?php
        $theType = '%id=fieldtype%';

        if($theType === 'image'){

           echo '<img src = "' . $fetch['%id=fieldid%'] . '"' . 'onerror="this.style.display=\'none\'"' . '>';


         }elseif($theType === 'link'){
             echo '<a href=' . '"' . $fetch['%id=fieldid%'] . '">' . $fetch['%id=fieldid%'] . '</a>';
         }else {
             echo $fetch['%id=fieldid%'];
         }
    ?>
        </div>
%%[[endif]]%%
