Arc Forumnew | comments | leaders | submitlogin
Ask Arc: How to add a toplabels in news.arc?
3 points by tvvocold 3365 days ago | 3 comments

4 points by kogir 3364 days ago | link

On Hacker News, the ask and show pages are implemented just like the front page, but they filter the item list based on title or whether or not there's a link.

And yes, that means they won't show items not already loaded into RAM ;)

    (defop ask ((p page))
      (pagepage ranked-stories* p
                [and (askpage-filter _) _]
                "ask" "Ask"))
The magic is in askpage-filter:

    (def askpage-filter (s)
      (and (astory s)
           (blank s!url)
           (~begins (downcase s!title) "show hn")))


1 point by akkartik 3365 days ago | link

Yes this came up before. Try the solution at and let me know if you still have issues.


2 points by tvvocold 3365 days ago | link

Thx, i had found this [1], but what i really need is a toptable/topic like (which is diff from 'about' page. (A story whose title begins with "Show HN" goes to /show. FYI [2]))

BTW,it would be nice if Arc Forum got a ask table/topic like