pepperstreet VIP
Total posts: 3,837
28 Jun 2015 00:17

Hello gteigland,

Some control elements are hidden/shown by certain template params, but I think you can't get rid of the entire button-group by simple configuration. So, you might have to remove it completely by editing your respective list template...

Headsup: This would also remove EDIT feature for admins! MAybe you should keep the markup, but retrict it to admins only!?


I don't know which template is your basis, I assume the blog ?

For an example see the default blog template around line 33+

<div class="pull-right controls">
    <div class="btn-group" style="display: none;">
        <?php echo HTMLFormatHelper::bookmark($item, $obj->submission_types[$item->type_id], $params);?>
        <?php echo HTMLFormatHelper::follow($item, $obj->section);?>
        <?php echo HTMLFormatHelper::repost($item, $obj->section);?>
        <?php echo HTMLFormatHelper::compare($item, $obj->submission_types[$item->type_id], $obj->section);?>
        <?php if($item->controls):?>
            <a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-mini">
            <?php echo HTMLFormatHelper::icon('gear.png');  ?>
            </a>
            <ul class="dropdown-menu">
                <?php echo list_controls($item->controls);?>
            </ul>
        <?php endif;?>
    </div>
</div>

The default table template is slightly different, but you should find the same button group around line 163+
Just make sure you don't break the table structure and don't remove the title markup!
I think you can delete the following IF part from line 162-178

<?php if($this->user->get('id')):?>
    <div class="user-ctrls">
        <div class="btn-group" style="display: none;">
            <?php echo HTMLFormatHelper::bookmark($item, $this->submission_types[$item->type_id], $params);?>
            <?php echo HTMLFormatHelper::follow($item, $this->section);?>
            <?php echo HTMLFormatHelper::repost($item, $this->section);?>
            <?php echo HTMLFormatHelper::compare($item, $this->submission_types[$item->type_id], $this->section);?>
            <?php if($item->controls):?>
                <a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-mini">
                    <?php echo HTMLFormatHelper::icon('gear.png');  ?>
                </a>
                <ul class="dropdown-menu">
                    <?php echo list_controls($item->controls);?>
                </ul>
            <?php endif;?>
        </div>
    </div>
<?php endif;?>

Headsup: Do not touch or alter the original default templates! Always create copies and rename them accordingly through Cobalt backend template manager.


gteigland VIP
Total posts: 159
28 Jun 2015 01:05

Thanks! Yeah I created my own template including for listing and just removed it from that template so then its still editable on the full view.

Powered by Cobalt