0
votes

I have setup the TYPO3 news extension (not tt_news) to show a date menu with archived news items. From the archive menu, you can go to the list-view with all news for a given month. From the list-view, you can go to the details-view, to actually view the news item. In the detail view, I have configured the list-view as PageId to return to.

I think this is a standard setup and has nothing special.

The link from the date-menu to the list-view contains the GET parameter "overwriteDemand", which adds the month and year to the demand of the list view, so only the news articles for the given month/year are shown. Actually this GET parameter is not kept, when linking to the detail-view (with the n:link viewHelper) and therefore also not given back to the list-view, when I go back to the list-view from the detail view. The list-view therefore shows all news records after I come back to the list view from a detail-view.

Adding a javascript.back() button is no solution for me, since I want to use real links.

Am I missing something or is this a missing feature?

2

2 Answers

1
votes

There are two ways to handle this.

the first option is, to edit the templates and add the parameters to the links using the arguments parameter of f:link.page (or something similar).

Second option is, create a new extension-template in the tree of the single page and add some typoscript, which keeps the parameters in the rendered link. The config name ist called linkVars and is descriped here: http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#linkvars

0
votes

tx_news uses <f:link.page in his templates. I just checked on github tx_news to see if it changed, but it still looks the same.

This is how tx_news generates the backlink:

<f:if condition="{settings.backPid}">
    <!-- Link Back -->
    <div class="news-backlink-wrap">
        <f:link.page pageUid="{settings.backPid}">
            <f:translate key="back-link" />
        </f:link.page>
    </div>
</f:if>

So it looks like the overwriteDemands are not kept. I think it would be a really good sugestion to the tx_news Dev-Team to keep the overwriteDemands in the backlink.

You have the {overwriteDemand} as an object in your template, so for now you can use something like this:

<f:link.action pageUid="{settings.backPid}" arguments="{overwriteDemand:{year: year, month: month}}">