klox7 VIP
Total posts: 914
08 May 2014 17:43

Hey,

I'm playing around with markup layout and want to change template labels to icons. Did anybody try this? markup-layout

Thanks

Last Modified: 12 May 2014


Sergey
Total posts: 13,748
09 May 2014 06:55

First there are icon parameters in markup template parameters. Turn it on. Do not forget to install media pack for icons. Now in the same parameters try to change menu labels to whitespace.

If that does not work, you will probably habe to create your own custom markup temaplte.


klox7 VIP
Total posts: 914
09 May 2014 07:31

Yes I know, but isn't this just for "Switch View" text not for template labels (which are inside switch view dropdown)?


Sergey
Total posts: 13,748
09 May 2014 08:42

Now i see what you mean. So waht I woudl do is to change name of template to

<?php foreach ($this->list_templates AS $id => $template):?>
    <?php $tmpl = explode('.', $id);
          $tmpl = $tmpl[0];
    ?>
    <li>
        <a href="javascript:void(0)" onclick="Cobalt.applyFilter('filter_tpl', '<?php echo $id?>')">
        <img src="/images/tmpls/<?php echo strtolower(str_replace(" ", "", $template));?>.png" />
        </a>
    </li>
<?php endforeach;?>

Then you only need to have 3 files

/images/tmpls/googlemap.png
/images/tmpls/grid.png
/images/tmpls/list.png

klox7 VIP
Total posts: 914
10 May 2014 18:54

Where is thumbs up button:) This works like a charm. Maybe add it in markup template? And with labels as tooltips...


Sergey
Total posts: 13,748
11 May 2014 06:47

klox7 Maybe add it in markup template?

Why you ask? this is exatly what I ment. To modify markup template.

klox7 And with labels as tooltips...

You can add this

<img src="/images/tmpls/<?php echo strtolower(str_replace(" ", "", $template));?>.png" 
    rel="tooltip" 
    data-original-title="<?php echo $template ?>" />

klox7 VIP
Total posts: 914
11 May 2014 19:24

Sergey Why you ask? this is exatly what I ment. To modify markup template.

Yes, yes, I just meant that you maybe add this possibility to your original template.

Sergey <img src="/images/tmpls/<?php echo strtolower(str_replace(" ", "", $template));?>.png" rel="tooltip" data-original-title="<?php echo $template ?>" />

I already added tooltips but thanks anyway (it shows your care for users). But again I meant for original cobalt markup template.


Sergey
Total posts: 13,748
12 May 2014 07:35

I can add paramters. But those parameters wil only add new conditions to templare. This will make template less readable.

My concept for templates is to put in it all that is possible to show. And then user may create custom template and delete all that is not needed.

Powered by Cobalt