Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.4k views
in Q2A Core by
I'm sorry if this question seems too easy. I am just not a PHP coder, and I don't know how I could add html contents to a new page I created in my QA portal. For example, I created this glossary page:

http://propertytips.rbasket.com.au/glossary

But it's content is empty at the moment, could someone please give me some hints how I can enter some html code in a qa-page-xxx.php file? Or ideally, could I include a .html file in?

Many thanks

2 Answers

+4 votes
by
First, you need to create an advanced custom theme by following the instructions here: http://www.question2answer.org/advanced.php#theme-advanced

In your theme's qa-theme.php file, override the main() method by using code which is something like the below:

<?php

    class qa_html_theme extends qa_html_theme_base
    {
        function main()
        {
            if ($this->request=='glossary') {
?>
Your custom HTML content goes here
<?

            } else
                qa_html_theme_base::main();
        }
    }
    
?>
by
Thanks gidgreen, I'll give it a try
by
Thanx a lot! it helped me!

little correction: you have to use
<?php
instead of
<?
–1 vote
by
and also can you tell me what is the php code to check if use is logged?
...