Override setting for a file - using it's own description as a comment

Author Message

Zoltan Szabo

Wednesday 18 August 2004 11:07:54 pm

I'm fighting with eZp3.4.1.
I'd like to make an override tpl file for paragraph.tpl.
I could do it in some cases, but now I can't move over.

My aim is to use the file own Description ezxml text attribute as a comment to the downloadable file itself, like this:
Something nice: myfile.pdf,
where 'Something nice' is the description. If I do not override the paragraph.tpl, it's not possible to put it in the same row as the filename itself.

If I put a file as a related object into the ezxml text, it works, but if I try to show it as a simple file after a fetch, it does not use my override file, but the original one.

I have this in my override.ini.append:

[p_r_gr_ph1]
Source=content/datatype/view/ezxmltags/paragraph.tpl
MatchFile=content/datatype/view/ezxmltags/p_r_gr_ph1.tpl
Subdir=templates
Match[attribute_identifier]=short_description

[p_r_gr_ph2]
Source=content/datatype/view/ezxmltags/paragraph.tpl
MatchFile=content/datatype/view/ezxmltags/p_r_gr_ph2.tpl
Subdir=templates
Match[class_identifier]=file

I copied the content/datatype/view/ezxmltags/paragraph.tpl file from the standard design into my own design filestructure, otherwise the system said 'there is nothing to override'.

Is there some possibility to set the debug system (or put a var_dump into some files) to know which override.ini section is used (and why)?

Bård Farstad

Wednesday 18 August 2004 11:49:02 pm

You can actually set this in stylesheets for your paragraph. Just make the paragraph not break the text flow. This can be addressed via div's indirectly so you should not need to change the template.

You should be able to do something like this:

<html>
  <head>
    <style>
      p { display: inline; }
    </style>
  </head>
  <body>
  <h2>Inline paragraphs</h2>
  <p>Paragraph content</p>
  <p>which does not </p>
  <p>break into blocks</p>
  </body>
</html>

--bård

Documentation: http://ez.no/doc

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 16:20:07
Script start
Timing: Jan 18 2025 16:20:07
Module start 'layout'
Timing: Jan 18 2025 16:20:07
Module start 'content'
Timing: Jan 18 2025 16:20:07
Module end 'content'
Timing: Jan 18 2025 16:20:07
Script end

Main resources:

Total runtime0.8996 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.3906152.6875
Module start 'layout' 0.00480.0024 741.078139.5078
Module start 'content' 0.00730.8909 780.5859527.6563
Module end 'content' 0.89820.0014 1,308.24228.0938
Script end 0.8996  1,316.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3497160.0002
Check MTime0.00130.1488160.0001
Mysql Total
Database connection0.00070.075410.0007
Mysqli_queries0.854694.9961540.0158
Looping result0.00050.0584520.0000
Template Total0.869396.620.4347
Template load0.00200.225520.0010
Template processing0.867396.405020.4336
Template load and register function0.00020.026010.0002
states
state_id_array0.00140.154110.0014
state_identifier_array0.00150.164620.0007
Override
Cache load0.00170.1886200.0001
Sytem overhead
Fetch class attribute can translate value0.00100.108420.0005
Fetch class attribute name0.00130.147730.0004
XML
Image XML parsing0.00070.073020.0003
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00080.0920170.0000
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs