Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
663 views
in Q2A Core by

Hi guys, I'm trying to make a widget that displays the title of the current page, ie the function: $this->page_title(); recent activity, reent questions and answers, most popular tags... etc etc, and so enable this widget only for some pages where I want to have title, and so remove function: page_title (); via advance theme, but I could not'm trying with this

function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
        {

        $title=@$this->content['title'];
        $themeobject->output('<H1>'.$title.'</H1>');

        }

any ideas? thanks to all

1 Answer

0 votes
by
selected by
 
Best answer

As mentioned in my PM, you need to use:

$qa_content

not

$this->content

since that's what you're given by the function call.

by
Thanks NoahY!
...