| @@ 217-234 (lines=18) @@ | ||
| 214 | * |
|
| 215 | * @return null|HTTPResponse |
|
| 216 | */ |
|
| 217 | public function tag() |
|
| 218 | { |
|
| 219 | $tag = $this->getCurrentTag(); |
|
| 220 | ||
| 221 | if ($tag) { |
|
| 222 | $this->blogPosts = $tag->BlogPosts(); |
|
| 223 | ||
| 224 | if($this->isRSS()) { |
|
| 225 | return $this->rssFeed($this->blogPosts, $tag->getLink()); |
|
| 226 | } else { |
|
| 227 | return $this->render(); |
|
| 228 | } |
|
| 229 | } |
|
| 230 | ||
| 231 | $this->httpError(404, 'Not Found'); |
|
| 232 | ||
| 233 | return null; |
|
| 234 | } |
|
| 235 | ||
| 236 | /** |
|
| 237 | * Tag Getter for use in templates. |
|
| @@ 261-278 (lines=18) @@ | ||
| 258 | * |
|
| 259 | * @return null|HTTPResponse |
|
| 260 | */ |
|
| 261 | public function category() |
|
| 262 | { |
|
| 263 | $category = $this->getCurrentCategory(); |
|
| 264 | ||
| 265 | if ($category) { |
|
| 266 | $this->blogPosts = $category->BlogPosts(); |
|
| 267 | ||
| 268 | if($this->isRSS()) { |
|
| 269 | return $this->rssFeed($this->blogPosts, $category->getLink()); |
|
| 270 | } else { |
|
| 271 | return $this->render(); |
|
| 272 | } |
|
| 273 | } |
|
| 274 | ||
| 275 | $this->httpError(404, 'Not Found'); |
|
| 276 | ||
| 277 | return null; |
|
| 278 | } |
|
| 279 | ||
| 280 | /** |
|
| 281 | * Category Getter for use in templates. |
|