<?php if (!empty($titles) && is_array($titles) && count($titles) > 0): ?>
    <?php foreach ($titles as $title): ?>
        <?php list($heading, $title, $styles) = $rdgb->helpers->get_title($title); ?>

        <?php if(!empty($title)): ?>
            <div class="title" style="<?php echo $styles; ?>">
                <<?php echo $heading; ?>>
                <?php
                    if (isset($placeholders)) {
                        echo $rdgb->helpers->set_placeholders($placeholders, $title);
                    } else {
                        echo $title;
                    }
                ?>
                </<?php echo $heading; ?>>
            </div>
        <?php endif; ?>
    <?php endforeach; ?>
<?php endif; ?>
