$border_size variable

Author Message

paul bolger

Tuesday 10 July 2007 9:23:26 pm

ezimage.tpl gets the border width for an image from a variable called $border_size - how does one set this variable? I can't find any reference to it in the documentation, the forums, or the ini files.

Paul Bolger

Betsy Gamrat

Thursday 12 July 2007 9:05:40 am

Paul,

Use this command:

grep -r "border_size" *

One of the files is:

design/standard/templates/content/datatype/view/ezimage.tpl

{*
 ... (other comments here) ...
 border_size   - Size of border around image, default is 0
*}
{default ... (other variables here) ...
         border_size=0}

When you call attribute_view_gui for the image, you can override the default border_size as follows:

{attribute_view_gui attribute=$node.data_map.image border_size=4}

Where <b>4</b> could be any value.

paul bolger

Sunday 15 July 2007 8:24:43 pm

Thanks Betsy.

I was sort of hoping that there was some undocumented mechanism to set this variable from the embed popup, so as to allow users to set a border when embedding an image.

I guess the other way of doing it would be to set a custom attribute and pull the result of that - all I have to do is work out how to get that value!

Paul Bolger

paul bolger

Thursday 11 February 2010 3:04:35 am

Two and a half years later and I'm back in the same place.

ezimage.tpl has the following:

<code>
{if $border_size|trim|ne('')}
{set $inline_style = concat( $inline_style, 'border: ', $border_size, 'px ', $border_style, ' ', $border_color, ';' )}
{/if}
</code>

Has the following:<code>$border_size, $border_style, $border_color</code>

Shouldn't they all be in the 'insert image' dialogue?

It looks to me like user border parameters got added at some previous stage, and then half dropped. I'm not a great believer in letting the editors muck around with the layout to that extent - I'd rather just have a border:yes|no option, and sort it out in the stylesheet - but this is just silly.

Paul Bolger

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 14:52:12
Script start
Timing: Jan 18 2025 14:52:12
Module start 'layout'
Timing: Jan 18 2025 14:52:12
Module start 'content'
Timing: Jan 18 2025 14:52:13
Module end 'content'
Timing: Jan 18 2025 14:52:13
Script end

Main resources:

Total runtime1.3814 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0234152.6250
Module start 'layout' 0.00550.0027 741.648439.4453
Module start 'content' 0.00821.3718 781.0938554.5156
Module end 'content' 1.38010.0013 1,335.609412.1719
Script end 1.3814  1,347.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2499160.0002
Check MTime0.00130.0954160.0001
Mysql Total
Database connection0.00050.039410.0005
Mysqli_queries1.321595.6582600.0220
Looping result0.00070.0512580.0000
Template Total1.351397.820.6757
Template load0.00230.165920.0011
Template processing1.349097.653420.6745
Template load and register function0.00010.007410.0001
states
state_id_array0.00100.075910.0010
state_identifier_array0.00260.189220.0013
Override
Cache load0.00200.1441330.0001
Sytem overhead
Fetch class attribute can translate value0.00040.029120.0002
Fetch class attribute name0.00150.107060.0002
XML
Image XML parsing0.00100.073920.0005
class_abstraction
Instantiating content class attribute0.00000.001380.0000
General
dbfile0.00090.0625220.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs