1

on TYPO3 with the tt_news extension, my contributors would like to previews news before publishing ; Problem : impossible to get a preview if the news is hidden. Our website is big and we can't display the news before to finish it, even for preview for a few seconds.

According to this documentation :

If a preview of hidden records needs to be allowed too, the checkbox “Allow hidden records” needs to be checked in the plugin.

No way to find this checkbox. Do you have any solution ?

Paolito75
  • 558
  • 1
  • 11
  • 33
  • Which TYPO3 news system are you using? You mention tt_news, but link to the documentation of tx_news. – sebkln Apr 06 '18 at 14:53
  • Hi @sebkln - I'm using tt_news. – Paolito75 Apr 06 '18 at 14:59
  • please provide some version numbers: which TYPO3/ which tt_news do you use? – Bernd Wilke πφ Apr 07 '18 at 01:27
  • I created an issue for this in the tt_news project on github: https://github.com/rupertgermann/tt_news/issues/102 That way you won't get a solution right now, but your request seems quite useful to me. If you subscribe to the issue, you will get notifications. – Sybille Peters Apr 10 '18 at 20:05

2 Answers2

0

According to the tt_news documentation, you have to set the following Page TSconfig:

tx_ttnews.singlePid = 37

where 37 is the UID of the page containing the single view plugin.

Apparently this functionality is currently broken:

The second issue on forge.typo3.org provides a possible solution which should work in general with all records of any extension (TYPO3 v7 and above!). Again, Page TSconfig (no TypoScript):

TCEMAIN.preview {
    tt_news {
        previewPageId = 37
        useDefaultLanguageRecord = 0
        fieldToParameterMap {
            uid = tx_ttnews[tt_news]
        }
    }
}

I successfully tested this in TYPO3 v7. One major drawback – as already noted in your question – is that this does not work with hidden records.

Previewing hidden records result in the error message

no news_id given

Edit: As Bernd suggested, you could make use of categories to hide drafts of news records and use the preview solution above:

  1. If you already use news categories: Set the category mode in the list view plugin(s) of tt_news to hide news records which do not own the desired categories. Let the editors assign the categories only if the content is ready.
  2. Otherwise: use a new category preview – as Bernd suggested – and hide records with this category in the list view plugin.

The latter is a bit more risky to use for editors, as they could forget to set this temporary category. Nonetheless, you as an integrator could use the TSconfig TCAdefaults to automatically assign this preview category to all new records. The editors would only have to remove the category when the news record is completed.

Another possible workaround could be to save drafts in a separate folder which is not used by the list view plugin of tt_news. Then you also could use the preview solution above.


If that's not the right way of working for you or your editors, you could try using the workspaces extension which ships with the TYPO3 core.

sebkln
  • 1,325
  • 1
  • 9
  • 17
  • Thanks for the help. At the end there is no perfect solution and the best way is to tell my contributors to hide/unhide the news, because alternatives are more complicated. Thanks again ! – Paolito75 Apr 09 '18 at 08:21
0

a clean solution would be the usage of workspaces. but not all extension support it.

so another option would be to simulate workspaces:
build a page where your news can be seen and secure it with a login. so if only the new records should be shown you might create a 'preview' category, which is shown only on the special preview page.

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • Hello Bernd, it's too complicated for newbie contributors. I'm gonna tell them to hide/unhide the news in the production environment beacause it's the simpliest solution. – Paolito75 Apr 09 '18 at 08:22