0

I am developing a site which has two main area's which I destinguish as two main system categories.

I use the latest version of tx-news (5.3.2) for articles and I assign them firstly to one of the two main system categories, and then to a specif category which exists for both main categories ...

in the frontpage I list a limited number of the latest articles, not limited by any category

  1. how can I create links that considers the choice of the main category?
  2. how can this show up in the Url: mydomain.com/category-1/article or mydomain.com/category-2/article
webman
  • 1,117
  • 15
  • 41

1 Answers1

1

You need to copy the LinkViewViewHelper of EXT:news to a custom extension and add the category uid then to the link. After that it is possible to rewrite the id with realurl to the title.

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • Can you point to any more information/code example, I get the idea but am still in the dark what to do exactly ... – webman Feb 09 '17 at 14:34
  • `namespace Vendor\NewsExtension\ViewHelpers;` or leave yours ... `class LinkViewHelper extends \GeorgRinger\News\ViewHelpers\LinkViewHelper` and add only ... etc., I know this is pretty basic to you ... – webman Feb 09 '17 at 14:42
  • i'd like to extend your `LinkViewHelper` otherwise I need to re-write all the templates using the custom extensions namespace and all the `n:link` to `my:link` ... – webman Feb 11 '17 at 06:43