1

I like to extend my news extension with new fields, like two urls that can be entered from backend. Is there a link or hint how to do that ?

I'm using Typo3 v10 and extension_builder can't be installed?

Mohamed Masmoudi
  • 547
  • 1
  • 9
  • 23
  • 1
    Does this answer your question? [Extend tx\_news with 1 field without extension\_builder](https://stackoverflow.com/questions/43094622/extend-tx-news-with-1-field-without-extension-builder) – pdu Apr 22 '21 at 11:12

1 Answers1

2

Did you check the documentation of EXT:news? There is a chapter exactly for this topic. Furthermore you can check EXT:eventnews, which is also mentioned in the documentation to see how it works.

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
  • Yes, but the problem is that the extension_builder can't be installed on the Typo3 v10 – Mohamed Masmoudi Apr 22 '21 at 17:31
  • You don't need EXT:extension_builder! Just read the documentation and build the code yourself. Let you inspire by EXT:eventnews. EXT:extension_builder just produces way too much overhead that is unnecessary. – Peter Kraume Apr 22 '21 at 19:44
  • Yes this is a good hint, i have read this and implemetend the new link, now the new field show in backend an is stored in the DB, but when it comes to frontend, nothing show, when i debug with debug>{news.item} the new field is not in the list. Do you have an idea why this happen ? Thanks! – Mohamed Masmoudi Apr 25 '21 at 20:09
  • 1
    Did you [create the domain model and register it](https://docs.typo3.org/p/georgringer/news/8.5/en-us/DeveloperManual/ExtendNews/ProxyClassGenerator/Index.html#register-the-class)? – Peter Kraume Apr 26 '21 at 05:45
  • I have missed to add this line : $GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['classes']['Domain/Model/NewsDefault'][] = 'my_tmpl'; Now the field is showing when i debug the object "newsItem", but is empty, in the DB it contains some chars, i think i did something wrong – Mohamed Masmoudi Apr 26 '21 at 08:11
  • 1
    Thanks, my issue was due that the field in DB wasn't the same label with the one in the class, also config { tx_extbase { persistence { don't work for mapping so i use plugin.tx_news { persistence { classes { GeorgRinger\News\Domain\Model\News { subclasses { – Mohamed Masmoudi Apr 26 '21 at 10:01