directy VIP
Total posts: 51
10 Jul 2014 16:26

Hi, i am a Resources (for joomla 1.5) user and i'm triyng to duplicate my old custom template in Cobalt.

how can i insert the edit/delete/print list of button? in my old template i wos used to use this line: edit)echo $item->edit?>

what for Cobalt? thanks marco

Last Modified: 13 Jul 2014


pepperstreet VIP
Total posts: 3,837
10 Jul 2014 18:09

Hello directy,

First of all, hence the docs about file locations and custom template.

Then have a look into the default templates. i.e. for article full view default_record_default.php

See around lines 115++ and find the term "controls". The complete markup is a bit more complex, because it contains bootstrap styles for creating a button-group and drop-down menu. More bloat, but you should find the important part easily.

You may know the little button with gear-icon in frontend, right? This menu includes the "edit" part and is found at lines 128++

<?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;?>

directy VIP
Total posts: 51
11 Jul 2014 09:31

Ok, it works but it open the popup only at the left border of the page and in the same position for all the record. Which css file/class should i manage to open the popup near the icon?

i had a look at the default template but i did not understand how to do...

where i can find these classes? dropdown-toggle btn btn-mini dropdown-menu

marco


pepperstreet VIP
Total posts: 3,837
11 Jul 2014 14:16

directy where i can find these classes? dropdown-toggle btn btn-mini dropdown-menu

All this is Bootstrap standard. (v2 homepage)

I don't know your custom template and surrounding containers. So, I can't really suggest something for allignment and positioning.

In general, for simple allignment there are pre-defined helper classes in bootstrap CSS. Those can be used for drop-downs as well.

For positioning the "controls", you might be better with surrounding containers... and relative/absolute positioning. i.e.:

DIV article START (relative)
DIV controls here... (absolute position to upper-left or right corner)
DIV article END.


directy VIP
Total posts: 51
11 Jul 2014 16:04

ok... solved thanks.. marco


Sergey
Total posts: 13,748
13 Jul 2014 12:12

How do you find Cobalt comparing to Resources?

Powered by Cobalt