I have this class for page titles:
class UI {
private static $title;
public static function getTitle() { return self::$title; }
public static function setTitle($value) { self::$title = $value; }
}
So in my frontpage I simple declare this:
UI::setTitle('Kiubbo.com :: Todas las Noticias, Fotos y Videos');
And works fine. The problem is to get the comments pages titles to change depending on the content (title of links). I want to be the same as this variable (that has the same name but it its for another function its not the same getTitle):
<?php echo $article->getTitle(); ?>
Which its in this function:
function showAllComments($article_id, $param)
{
$article = Article::getById($article_id);
if(!empty($article))
{
?>
<div class="news_item">
<h2 class="news_item_title"><b><a href = "<?php echo $article->getUrl(); ?>"><?php echo $article->getTitle(); ?></a></b></h2>
</div>
If anyone can help I appreciate it.
Thx