pad using &nbsp

Author Message

James Ward

Wednesday 22 June 2005 11:28:21 am

The pad function by default pads spaces where additional characters are needed however these are standard spaces and are not rendered in a browser. Is it possible to make &nbsp the pad character?

This default of standard spaces for the pad character is pretty useless.

http://www.ez.no/ez_publish/documentation/development/libraries/ez_template/operators/string_handling

working at www.wardnet.com
blogging at www.jamesward.ca

Ɓukasz Serwatka

Friday 24 June 2005 6:52:36 am

Hi James,

Have you tried?

{'String'|pad( 16, ' ' )}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

James Ward

Wednesday 29 June 2005 12:16:13 pm

Tried that with no success. Both with single and double quotes. It pads the actual letters. My data appears as:
text&nbs
text2&nb
text10&n
...and so on.

working at www.wardnet.com
blogging at www.jamesward.ca

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 19 2025 09:58:14
Script start
Timing: Jan 19 2025 09:58:14
Module start 'layout'
Timing: Jan 19 2025 09:58:14
Module start 'content'
Timing: Jan 19 2025 09:58:16
Module end 'content'
Timing: Jan 19 2025 09:58:16
Script end

Main resources:

Total runtime1.4488 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0313152.6094
Module start 'layout' 0.00480.0029 741.640639.4297
Module start 'content' 0.00771.4394 781.0703541.0625
Module end 'content' 1.44710.0016 1,322.132812.1953
Script end 1.4487  1,334.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2234160.0002
Check MTime0.00130.0887160.0001
Mysql Total
Database connection0.00050.034110.0005
Mysqli_queries1.395796.3389570.0245
Looping result0.00050.0379550.0000
Template Total1.411497.420.7057
Template load0.00220.155020.0011
Template processing1.409197.264020.7046
Template load and register function0.00030.017610.0003
states
state_id_array0.00170.119610.0017
state_identifier_array0.00130.089020.0006
Override
Cache load0.00180.1264190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.039620.0003
Fetch class attribute name0.00120.086150.0002
XML
Image XML parsing0.00260.180420.0013
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00360.2487240.0002
String conversion0.00000.000540.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs