Customized ce_download.tpl won't display in catalog list
[attachment=0:nfs21er6]Schermafbeelding 2010-04-26 om 16.32.19.png[/attachment:nfs21er6]
A data entry in my catalog list won't display my customized ce_downloads.tpl. In above screenshot the data entry is displayed just like the standard format from the original ce_download.tpl. But in my edited templates/ce_download.tpl I erased the file size and the name (to just 'Download' instead of the original name) from the formatting. When I place a download in an article the formatting works. But not in the catalog list view... What goes wrong? Could there be a file in the Catalog module that formats the download (data entry) view?
Re: Customized ce_download.tpl won't display in catalog list
Not sure why you're editing the ce_download, because the catalog has its own template and you have to edit that. each field's data is usually formatted in each field, but until a better approach, you have access to BOTH the raw and formatted data, e.g. there is an array with all the file items (download names and other meta data) in the catalog data array, and you can then format them yourself to create the correct icon, display and download link. The catalog only does a basic formatting, that's similar to the original download template (the one you're referring to), but we're definately NOT calling the ce_download template, because such a link would have us add more than a 2-level template hierarchy, so that's not going to work best.
Re: Customized ce_download.tpl won't display in catalog list
Thanks Thyon. Didn't realize that the Catalog doesn't use Typo's ce_download...
However I fixed it using the list template and css, so I don't have to mess with the extension files.
list template:
Code:
<p class="download"><?php echo $entry['data']['download']['value']; ?></p>
css file:
Code:
.download {
display:block;
height:47px;
margin-top:-10px;
text-indent:-9999px;
width:45px;
line-height: 47px;
}
.download img{
display: none;
}
.download a {
background:url("../images/pdf.png") no-repeat scroll left top transparent;
display:block;
height:100%;
margin:0 0 0 0;
outline:medium none;
width:100%;
}
Which resulted in:
[attachment=0:2eetaf5i]catalog.png[/attachment:2eetaf5i]