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

I got a new design that needs some tweaks. One is to add a custom button (just holding a link) to the default button list of each question (note: in Snow theme here in this forum, they don't look like buttons but as links).

$this->q_view_buttons($q_view);

is responsible for the output, it uses $this->form($q_view['form']); as data.

How can I add a link (button) inside this array?

thx, Kai

Q2A version: 1.6.2

1 Answer

+2 votes
by
edited by
public function q_view_buttons($q_view)
    {
        // add custom button
        $q_view['form']['buttons']['test'] =
            array(
                "tags" => 'name="q_doedit"',
                "label" => 'test',
                "popup" => "Edit this text"
            );
    
        // default
        parent::q_view_buttons($q_view);
    }
by
It's working. Thank you
...