hi
why i can't use function inside <% control %> ?
for example i have:
function Wycieczki_sg() {
$doSet = DataObject::get(
$callerClass = "ItWycieczkaPage",
$filter = "Widocznosc = 'Stale'",
$sort = "",
$join = "",
$limit = "3"
);
return $doSet;
}
function titlewrap($str) {
$new_title = wordwrap($str, 23, "<br />\n");
return $new_title;
}
in template:
<% control Wycieczki_sg %>
<div class="tour" onclick="location.href='$Link'">
<h2><a href="$Link" title="Go to the $Title.XML page">
$titlewrap($Title);
</a></h2>
<a href="$Link" title="Go to the $Title.XML page">
<% control Zdjecie_glowne %>
<img class="" src="$URL" alt="" width="140" height="90" />
<% end_control %>
</a>
</div>
<% end_control %>
but $titlewrap($Title); doesn't work