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

I would like to have the page numbers right at the front page of the website and to display it at the top so that the user sees there are already many pages of posted questions. How can I do that?

Q2A version: Q2A 1.5.4
by
good idea! It would be good to have one on top and one at the bottom as is :)

2 Answers

–1 vote
by
selected by
 
Best answer

The front page only shows "recent questions and answers" so is not paginated. I think you can make the front page show the same as /questions by doing this:

$QA_CONST_PATH_MAP=array(
    'questions' => '',
);

But I haven't tested that.

 

Edit: as for copying the links at the top, that is done in an advanced theme. In the main() function, you'll see $this->page_links() towards the end. Just copy that line and put it further up, anywhere above main_parts() should work.

by
Thanks it works.However, how can I display it at the top of the page?
by
@Waterfr I updated my answer.
by
Where to add this code?I mean which file?I too want to show page nos. on QA page
by
I dont have my code in front of me, but for cases like this I would open the entire code in notepad++ and open the find window and then goto "find in files" tab where you can search the entire project for a string like "QA_CONST_PATH_MAP". Download notepad++ by googling it. - good luck
by
I guess this is in qa-config.php line 86, that you have to uncomment.
by
It has the following lines $QA_CONST_PATH_MAP=array(
        'questions' => '',
        'categories' => 'sections',
        'users' => 'contributors',
        'user' => 'contributor',
    );

I uncommented all of them so it becomes part of the code but nothing happened.Still i dont find page nos. on Q & A page
by
replace them with the code Scot says. it works
by
By changing 'questions' => '', you change the main page, but you do not add a pagination to the default page: yourdomain.com/qa (!)
by
Where should this be done ?
by
same problem here, you still have no pagination inside the categories, there it still says: ....to see all questions in this category...
+1 vote
by
The selected best answer, does not bring pagination to front page! ( as you wanted it to)
...