Thursday 16 September 2010 3:52:56 am
Ok . If you want to show the file name, file size , date. Here is the way. First you find out ezbinaryfle.tpl which is located at content/datatype/view/ezbinaryfile.tpl this is the template that is used when u use attribute_view_gui for ezbinaryfile. So what you have to do is in your template file you have to put {$node.object.published|l10n(shortdatetime)} // this is to show the date when the file published {attribute_view_gui attribute=$node.data_map.file icon_title=$node.name} // to show file name and size next move on to see how this attribute_view_gui attribute working to show file name and size for that you need to override the content/datatype/view/ezbinaryfile.tpl(you should read override mechanism of ez http://ez.no/doc/ez_publish/techn...mplates/the_template_override_system) Here is the code
[my_fle_info] // block name in your site access override file Source=content/datatype/view/ezbinaryfile.tpl // source file which is the deafult file when you
use attribute_gui for file type MatchFile=content/datatype/view/my_file.tpl // your created override template for attribute_gui for file type Subdir=templates Match[class_identifier]=file // override condition for class my_file.tpl instead of ezbinary.tpl mean whenever you use attribute_gui for ,class type file , it will take my_file.tpl . so create my_file.tpl and put it in your curent design override folder like this // read http://ez.no/doc/ez_publish/techn...d_basics/designs/design_combinations current design/override/content/datatype/view/my_file.tpl Now create the code for my_file.tpl Like this {$attribute.content.original_filename|wash( xhtml )} // to show file name {$attribute.content.filesize|si( byte )} // show file size Try this link for better understanding http://share.ez.no/forums/setup-design/override-templates-used-by-attribute_view_gui#comment26315 Yes you are done. Regards Romeo.
|