Lord_Helmchen VIP
Total posts: 28
18 Nov 2014 13:08

Hello Sergey, there is hspace and vspace in Image Field Templates. Could you change this to

style="margin: <?php echo $this->params->get('params.img_list_vspace');?> <?php echo $this->params->get('params.img_list_hspace');?>"

? This would be more html5 compatible.

Last Modified: 09 Mar 2015


Sergey
Total posts: 13,730
20 Nov 2014 11:05

Done.

And Welcome back!


brianpat VIP
Total posts: 211
21 Nov 2014 13:02

do we have now default image , if no image is entered? can the default image be shown on record list and record detail page?


pepperstreet VIP
Total posts: 3,833
21 Nov 2014 13:35

brianpat do we have now default image , if no image is entered? can the default image be shown on record list and record detail page?

There is a default image parameter. I guess for quite some time now...

Bildschirmfoto 2014-11-21 um 14.31.01


brianpat VIP
Total posts: 211
21 Nov 2014 16:22

i got it, but do we have default image in gallary?


Lord_Helmchen VIP
Total posts: 28
21 Nov 2014 16:48

Thank you, Sergey! Keep up the good work.

@brianpat You mean if there is default image within cobalt package? No, because there is a wide range how cobalt is used. For example i have a recipe site and another with audiobooks. So i need different default images.


pepperstreet VIP
Total posts: 3,833
22 Nov 2014 00:53

brianpat i got it, but do we have default image in gallary?

Gallery field? No. Not by configuration. You have to check the "default" field value in the template. I guess, it might not be EMPTY... but it should have a value to create a conditional output. Then you can display a placeholder or custom CSS class.

If you are talking of the thumbnail preview, you might also display a permanent background image. I mean, show it always, if thumbnails are present, they cover the background/placeholder.


brianpat VIP
Total posts: 211
07 Mar 2015 22:08

pepperstreet placeholder ?

Any idea where is this code in the file?


pepperstreet VIP
Total posts: 3,833
09 Mar 2015 05:58

brianpat Any idea where is this code in the file?

I could imagine 2 different ways and locations...

1.) either customize list/full view template
Manually output the field and your placeholder markup. Placeholder could be a real local image, or something like placehold.it online service.
Most likely a simple if/else should work...

2.) or customize the field output template
Disable empty value check, so there is always a field output. This way you keep the DIV wrapper, the thumbnail width and height parameters... and you can use your custom field class parameter, too. Assign CSS properties to style the background.)

Second method should also work with default templates field loop! So, if you want to use and keep a default template output... I probably would choose 2.)

Replay Topic
Uploading
Click here to upload and insert file from you hard drive: (png, gif, jpg, jpeg, zip, txt, rar)
Powered by Cobalt