Arc Forumnew | comments | leaders | submitlogin
How do I create an about page?
4 points by jwk 4153 days ago | 1 comment
Hi Folks I hope this is not a silly question for such a hardcore forum.

How do I create a link to an about page? I would like to insert "about" after "submit" on the site (AfriTech.org), which is starting to gain considerable traction.

I have looked through the news.arc code and I see where the "submit" element is created but from there I am not sure how the underlying link is created.

Thanks,



3 points by akkartik 4153 days ago | link

That's a cool forum!

I assume you're looking at the toprow function? (http://github.com/nex3/arc/blob/f311b3879c/lib/news.arc#L618) If the url is at /about all you have to do is add:

  (link "about")
under the link to "submit".

To create /about, use newsop. Here's a simple example to append to news.arc:

  (newsop about ()
    (shortpage user nil "about" "About" nil
      (pr "hihihi")))
Does this work? Feel free to ask more questions if it didn't. If it did work, read on.

---

If it works, you might notice that the "about" link on the top nav of the about page isn't highlighted like say the "new" link is for the corresponding page. To fix this, add "about" to toplabels, and change the call in toprow to this:

  (toplink "about" "about" label)
Now the "about" in shortpage gets passed to label in toprow and toplink has enough information to decide to highlight it.

Did that make sense?

-----