mojotech/scrivener

Last page option

Closed this issue · 1 comments

dipth commented

It would be practical to have the ability to load the last page whatever that page number might be.

Imagine that I have a ForumTopicController that loads a forum topic and all the replies to that topic:

forum_replies = assoc(conn.assigns[:forum_topic], :forum_replies)
                |> ForumReply.in_order
                |> preload(:user)
                |> Repo.paginate(page: sanitized_page(params["page"]))

Whenever I link to a forum topic from other pages, I would like to link to the last page (ie. the latest replies), not the first page. This could for instance be done by setting ?page=last.

Thanks for the issue. I don't think we'll support this directly in scrivener but I believe scrivener_html would be able to help with this.