Forums / Setup & design / Override setting for a file - using it's own description as a comment

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