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

 i add this function for show widget only in main page, but when click in category link(main page) i see my widget in category question list. how to show widget only in main page?

function allow_template($template)
        {
            $allow=false;
            
            switch ($template)
            {
                
                case 'qa':
        
                    $allow=true;
                    break;
            }
            
            return $allow;
        }

 

function allow_region($region)
        {
            return ($region == 'main');
        }

output function:

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

 

        }

NOTE: category link is: mydomain/nameofcategory

Q2A version: 1.5.4 - 1.6.2

Please log in or register to answer this question.

...