From 7b1cd1e3021a9acda440dd797b14b758f6b9ef68 Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Tue, 24 Jul 2018 09:37:53 +0200 Subject: [PATCH] [TASK] Update Readme --- Classes/Command/MigrateNewsCommandController.php | 4 ++-- README.md | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Classes/Command/MigrateNewsCommandController.php b/Classes/Command/MigrateNewsCommandController.php index c762322..399d025 100644 --- a/Classes/Command/MigrateNewsCommandController.php +++ b/Classes/Command/MigrateNewsCommandController.php @@ -101,7 +101,7 @@ class MigrateNewsCommandController extends CommandController { * @param int $year only news from that year will be migrated * @param string $languageMapAsJson a json, mapping language ids (old => new). this is needed if the sys_language_uids have changed * @param string $categoryMapAsJson a json, mapping sys_category ids (old => new). t - * @param $pId $year only news from that year will be migrated + * @param int $pId only news from that pid will be migrated * * @throws IllegalObjectTypeException * @throws UnknownObjectException @@ -113,7 +113,7 @@ class MigrateNewsCommandController extends CommandController { $categoryMapAsJson = '{"2":10,"3":11,"4":12,"5":13,"6":14,"7":15,"8":16,"9":17}', $pId = 52 ) { - // fix repair translation bug where tsfee is missing from command controller, can be removed when v1.5 is released + // fix repair translation bug where tsfe is missing from command controller, can be removed when v1.5 is released if (!$GLOBALS['TSFE']) { /** @var TypoScriptFrontendController $typoScriptController */ $GLOBALS['TSFE'] = $typoScriptController = $this->objectManager->get( diff --git a/README.md b/README.md index e184b35..636dd11 100644 --- a/README.md +++ b/README.md @@ -313,4 +313,16 @@ You can also handle the localisation of news pages for all the languages in your - **full-opacity flag icon** : Edit the existing localisation record - **half-transparent flag icon with <img height="14px" width="14px" src="https://camo.githubusercontent.com/b10f4d50dc21b152cde15cef5983c139e77b1c34/68747470733a2f2f7261776769742e636f6d2f5459504f332f5459504f332e49636f6e732f6d61737465722f646973742f6f7665726c61792f6f7665726c61792d6e65772e737667"/> overlay** : Create new localisation record -***Note*** : The extension also adds a News Module link in the Page Module of News/Category pages \ No newline at end of file +***Note*** : The extension also adds a News Module link in the Page Module of News/Category pages + + +## Migrating tx_news to sg_news + +This extension comes with the command controller task **** to migirate tx_news entries to sg_news. The task comes with the following parameters: + +- **copyPageId** : You will need a template site, which will be the basis of each new news record. Create your content elements accordingly on this site. +- **categoryPid** : This needs to be the category page id, you want your news to be children of. +- **year** : Only news of this year will be migrated +- **languageMapAsJson** : a json string, mapping language ids (old => new). this is needed if the sys_language_uids have changed +- **categoryMapAsJson** : a json string, mapping sys_category ids (old => new). +- **pId** : only news from that pid will be migrated -- GitLab