extbase

TYPO3 Extbase individual code on backend-deletion of an object

天涯浪子 提交于 2019-12-01 06:23:44
问题 I would like to execute some individual code when one of my Extbase domain objects is deleted from the list view in TYPO3 backend. Thought that it could / would work by overwriting the remove( $o ) method in the according repository like public function remove( $object ) { parent::__remove( $object ); do_something_i_want(); } , but that won't work I guess. Looks like the repository-methods are only called / used by actions of my extension (e.g. if I had some delete-action in a FE- or BE

How to set breadcrumb for tx_news TYPO3

≯℡__Kan透↙ 提交于 2019-12-01 01:59:10
I have a TYPO3 site. I need to set a breadcrumb. For news I need to show the news title inplace of 'News Detail' (Page title of news plugin). How to implement that? My code is <v:page.breadCrumb class="breadcrumb" levels="1" showCurrent="1" divider=">" showCurrent="1" entryLevel="1"/> or any other method for getting the title like <ol class="breadcrumb"> <li><a href="/">Home</a></li> <li><a href="/news">News</a></li> <li class="active"> ???????? </li> </ol> Sorry but that is not possible out of the box. The news record is not a real page and therefore must be added a bit different. Instead of

How to set breadcrumb for tx_news TYPO3

℡╲_俬逩灬. 提交于 2019-11-30 20:21:44
问题 I have a TYPO3 site. I need to set a breadcrumb. For news I need to show the news title inplace of 'News Detail' (Page title of news plugin). How to implement that? My code is <v:page.breadCrumb class="breadcrumb" levels="1" showCurrent="1" divider=">" showCurrent="1" entryLevel="1"/> or any other method for getting the title like <ol class="breadcrumb"> <li><a href="/">Home</a></li> <li><a href="/news">News</a></li> <li class="active"> ???????? </li> </ol> 回答1: Sorry but that is not possible

extbase repository findAll() returns result null

折月煮酒 提交于 2019-11-30 18:54:50
I have several Controllers like those: CategoryController and NewsController As well as the domain models for category and news and reposirtories for both. In the NewsController I do a dependencyInjection like this (the same way as in categoryController): /** * categoryRepository * * @var Tx_MyExtension_Domain_Repository_CategoryRepository */ protected $categoryRepository; /** * injectCategoryRepository * * @param Tx_MyExtension_Domain_Repository_CategoryRepository $CategoryRepository * @return void */ public function injectCategoryRepository(Tx_MyExtension_Domain_Repository_CategoryRepository

Typo3 V6: How to create a content element container? (without TV)

你说的曾经没有我的故事 提交于 2019-11-30 04:12:00
For a project I'm using Typo3 v6.0. I'm looking to create nested content elements, or a content element container. I want to be able to create an inline two-column layout without using a specific template for it. I'm looking to do this without the use of templavoila. Extensions I have tried are gridelements , kb_nescefe , bs_fce , multicolumn but these do not work because they are not compatible with Typo3 V6. I'm aiming for an end result like the attached image. Where the inline two-column content can be ommitted, used once or used multiple times, containing any other content element. I'm

extbase repository findAll() returns result null

杀马特。学长 韩版系。学妹 提交于 2019-11-30 03:35:51
问题 I have several Controllers like those: CategoryController and NewsController As well as the domain models for category and news and reposirtories for both. In the NewsController I do a dependencyInjection like this (the same way as in categoryController): /** * categoryRepository * * @var Tx_MyExtension_Domain_Repository_CategoryRepository */ protected $categoryRepository; /** * injectCategoryRepository * * @param Tx_MyExtension_Domain_Repository_CategoryRepository $CategoryRepository *

Parse an existing JSON string in fluid template?

丶灬走出姿态 提交于 2019-11-29 18:09:46
I have a JSON string with some data I want to render in a template. As Fluid arrays are notated in JSON too, I thought I might just take that JSON string and hand it over to fluid, telling it to treat it just like some other array and use it in the template. Thus gaining a lot of speed and losing overhead (don't have to split the JSON data up to save it in the DB, can template it easily in fluid). It wouldn't work, at least not how I tried it. <f:alias map="{item.jsonData}"> {fieldname} </f:alias> It - of course - complained it had received a string, not an array. Do I have to build a

TYPO3: How could I add css and js files via controller initialize action and page renderer?

一世执手 提交于 2019-11-29 12:36:13
I am using the new page renderer from TYPO3 8 on controller level to add extension specific css and js files via an initializeAction: public function initializeAction() { $extPath = ExtensionManagementUtility::siteRelPath( $this->request->getControllerExtensionKey() ); $extJs = $extPath . 'Resources/Public/Js/ext_booking_manager.min.js'; $extCss = $extPath . 'Resources/Public/Css/ext_booking_manager.css'; /** @var PageRenderer $pageRenderer */ $pageRenderer = $this->objectManager->get(PageRenderer::class); $pageRenderer->addCssFile($extCss); $pageRenderer->addJsFooterFile( $extJs, 'text

Typo3 Extbase Set and Get values from Session

此生再无相见时 提交于 2019-11-29 11:36:08
I am writing an extbase extension on typo3 v6.1 That extension suppose to do a bus ticket booking. Here what my plan is, user will select date and number of seats and submit the form. Here my plan to push the date and rate of the selected seat to session (Basket). And while making payment, I wanted to get that values from session and after payment I need to clear that particular session. So In short, How to Push and retrieve the values to and from the session in extbase. Any suggestions ? Thank you. freshp There are different ways. The simplest would be for writing in the session $GLOBALS[

TYPO3 extbase & IRRE: add existing records with 'foreign_selector'

こ雲淡風輕ζ 提交于 2019-11-29 08:04:42
I "kickstarted" an extension with the extbase extension builder that contains some 1:1 and 1:n relations. It automatically set the field types to 'inline' and displayed a nice IRRE UI in the backend. But by default, there is no way to select an existing record, just create new ones. I found various explanations on how to achieve this with 'foreign_selector', but all of them very sketchy. The feature itself should be working, see https://forge.typo3.org/issues/43239 Can someone walk me through this or point to a working example in the TER? I could create a step-by-step tutorial from the example