2010-08-15, 23:28:48
for those who didn't upgraded to 2.02 i'm using this function in theme_functions.php:
and then call in your template or component
Cheers
Code:
function get_short_content($page){
$path = "data/pages";
$thisfile = @file_get_contents('data/pages/'.$page.'.xml');
$data = simplexml_load_string($thisfile);
echo '<p>';
echo '<b>';
echo stripslashes(htmlspecialchars_decode($data->title, ENT_QUOTES));
echo '</b></p><p>' ;
echo substr((stripslashes(htmlspecialchars_decode($data->content, ENT_QUOTES))),0,350);;
echo '.............</p><p>' ;
echo '<a href="index.php?id='.$page.'">Read more</a></p>' ;
}
and then call in your template or component
Code:
<?php get_short_content('pagetitle');?>
Cheers