Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customize or arguments for topic_page_links? (repost)


  • hotforwords
    Member

    @hotforwords

    Sorry.. had to repost this as my last one broke and closed the post automatically as a result…

    I like the topic_page_links() that exists in the kakumei theme, but when the number of posts gets too large it stretches out the page.

    Are there any arguments for this tag to limit the number of pages it shows?

    Here is an example on my forum: http://www.hotforwords.com/forums/

    Or is there a way to use CSS to have them line break?

    The navigation topic_pages() does a cool thing by breaking up the pages with the … but I can’t get that tag to work properly on the home page.

    Thanks!

    Marina

Viewing 4 replies - 1 through 4 (of 4 total)

  • chrishajer
    Participant

    @chrishajer

    Marina, in the front-page.php template file, you can change topic_page_links() to topic_pages($topic->ID) and get the topic page links with the … in the middle (shows just beginning and ending pages.)

    You still have a problem when there is a long topic title that fills the space for that table cell. You could put a new row beneath the topic, on the front page, so all the topic page links are in a row beneath the topic title. In fact you could do that with the topic_page_links() as well and not use the other function. You might want to test if there *are* topic page links before creating a new row, otherwise you’d have a blank row if there are no page links.

    You could also do this in your CSS:

    #front-page #discussions td {
    white-space: nowrap;
    }

    But that would just make the cell not wrap, which will just break the layout further.

    You could do this:

    #front-page #discussions td {
    overflow-x: hidden;
    }

    But that just hides whatever won’t fit. That’s not a good solution.


    hotforwords
    Member

    @hotforwords

    Chris,

    I tried topic_pages($topic->ID) and it gives me the nav like you said (including next by the way).. but the links go nowhere (they go to: /forums/page/2 which does not include seem to include the topic). This means that the $topic->ID appears to be doing nothing.

    Am I entering that $topic->ID incorrectly?

    I am using a – and then the >


    hotforwords
    Member

    @hotforwords

    in other words I am getting the same thing with both topic_pages() and topic_pages($topic->ID)


    hotforwords
    Member

    @hotforwords

    I just solved it… I went to: /bb-includes/functions.bb-template.php -> line 932 and changed ‘show_all’ => false to ‘show_all’ => true

    I kept the topic_page_links() as is and this change automatically truncated the pages with a … in the middle.

    You can see it in action here: http://www.hotforwords.com/forums/

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.