Perry
1
in the excerpt() output links doesn’t work,
what can i do?
<div class="news-short-story">
<?php echo $project->richtext()->excerpt(30) ?>
<span>+</span>
</div>
<div class="news-full-story">
<?php echo $project->richtext()->kirbytext() ?>
</div>
output
with excerpt():
info@domain.com
without excerpt()
<a href="mailto:info@domain.com">info@domain.com</a>
texnixe
2
The excerpt function removes all html tags …
Perry
3
okay
the css way:
overflow: hidden;
height:2rem;
texnixe
4
I’d go for a custom function, like outputting only the first paragraph or whatever you prefer; here is an example:
<?php
function getFirstPara($string){
$string = substr($string,0, strpos($string, "</p>")+4);
return $string;
}
?>