401/mimetypes/html.pm
From Cyclone3 Wiki
This is processor is used from 401-article_list.lite.mdl and other modules which are rendering HTML code.
Rendering HTML code is processing of standard HTML code with Cyclone3 informations into
How is Cyclone3 informations represented in HTML code:
<img src="" id="a501:ID_entity=123:ID_format=2">
Translated into:
<img src="http://www.example.tdl/media/a501/image/file/0000/2/abcdef.jpg" alt="Description">
Every translation is defined in default template [1]. Translations process and templates can be overriden by input params.
Synopsis
my $p=new App::401::mimetypes::html;
# render every a501 image by different way
$p->{'entity'}->{'a501_image'}=qq{
<div class="data" style="float:<%attr_align%>; margin-right:0.5em; margin-left:0.5em;">
<img src="<%attr_src%>"
alt="<%attr_name%>"
width="<%attr_width%>"
title="<%attr_name%>"
border="1"/><br/>
<span><%attr_name%></span>
</div>
};
$p->parse($db0_line{$part});
$p->eof();
my $part_html=$p->{'out'};
