Export to GitHub

foorum - HowRSS.wiki


NAME

Foorum::Manual::HowRSS - How we build RSS system

How we build RSS system

  • we don't use L or or anything else to build RSS, instead we just use TT2 to produce RSS XML.
  • RSS URL is always add /rss at behind. like:
    1. /forum/FoorumLongLive has RSS: /forum/FoorumLongLive/rss
    2. /site/popular has RSS: /site/popular/RSS
    3. /forum/FoorumLongLive/72 has RSS: /forum/FoorumLongLive/72/rss
  • since URL is so special, we have a stash: $c->stash->{is_rss_template} = ( $path =~ /\/rss(\/|$)/ ) ? 1 : 0;
    1. Root.pm sub end {}. if res->redirect(), we raise RSS error.
    2. Root.pm sub end {}. if template is not RSS, raise RSS error.
  • we have RSS and it's based URL in one sub. so it's pretty neat and easy to read.

SEE ALSO

RULES