extbase

How to implement the sourceCollection responsive image rendering in TYPO3?

可紊 提交于 2019-12-24 12:05:13
问题 I want to implement responsive image rendering according to the different scale (media) in TYPO3 using sourceCollection? <picture> <source src="fileadmin/_processed_/imagefilenamename_595cc36c48.png" media="(max-device-width: 600px)" /> <source src="fileadmin/_processed_/imagefilenamename_42fb68d642.png" media="(max-device-width: 600px) AND (min-resolution: 192dpi)" /> <img src="fileadmin/_processed_/imagefilenamename_595cc36c48.png" alt="" /> </picture> I can render it using TypoScript but

How to access the ext_conf_template.txt (extension configuration) in typoscript?

旧街凉风 提交于 2019-12-24 06:35:20
问题 There are a few settings in the ext_conf_template.txt in my extension. I want to check the value of one of these settings, but in typoscript , not in PHP. In PHP it works like this: unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['myExt']) How should I do this in typoscript? 回答1: I did something similar in my code snippet extension (see complete code on Github), where I just added a custom TypoScript condition: [DanielGoerz\FsCodeSnippet\Configuration\TypoScript\ConditionMatching

TYPO3 7.6.10: How to extend the felogin extension?

不想你离开。 提交于 2019-12-24 04:04:12
问题 I tried to extend the core extension felogin with an extra extension called "feloginextended". I want to add the first_name and the last_name property of the current user into my logout formular. This is my overridden template (only the logout part): <!--###TEMPLATE_LOGOUT###--> <form class="login-form" action="###ACTION_URI###" target="_top" method="post"> <div> <div class="user">###FIRSTNAME### ###LASTNAME###</div> <a class="page-link-button" href="http://tf.lightblue.eu/index.php?id=14"

Extend Repository of a foreign TYPO3 extbase extension

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:53:04
问题 I have installed the extension 'femanager' on a TYPO3 6.2 installation and successfully extended it with my own fields that get stored and read from the database. Now there is an action in a Controller that calls upon the UserRepository for the findByUsergroup() method to render a list of fe_users with a filter. I want to extend the search filter, and therefore I must alter the method findByUsergroup() from my extension. Is this possible, and if so, how? I have been developing a lot with

Extend Repository of a foreign TYPO3 extbase extension

拟墨画扇 提交于 2019-12-24 03:52:55
问题 I have installed the extension 'femanager' on a TYPO3 6.2 installation and successfully extended it with my own fields that get stored and read from the database. Now there is an action in a Controller that calls upon the UserRepository for the findByUsergroup() method to render a list of fe_users with a filter. I want to extend the search filter, and therefore I must alter the method findByUsergroup() from my extension. Is this possible, and if so, how? I have been developing a lot with

How to compare DateTime in Extbase repository

余生颓废 提交于 2019-12-23 08:27:15
问题 I try to compare the start date of an event with the current date in order to only display the next events. This is my try in the eventRepository: public function findNext() { $query = $this->createQuery(); $query->matching( $query->greaterThanOrEqual('datum_beginn', new \DateTime('midnight')) ); return $query->execute(); } But the result is not as expected. This is the resulting query: SELECT events.* FROM events WHERE events.datum_beginn >= 1413669600 AND ... As you can see the DateTime is

TYPO3 Extbase bidirectional 1:n relation

杀马特。学长 韩版系。学妹 提交于 2019-12-23 05:17:59
问题 Let's say we have a 1:n relation between an Author and Book model. Modeling the relation using the Extension Builder, the necessary code to get Book 's for an author is provided. But what about the inverse ? How do I get the Author for a given Book class? 回答1: I assume you have created the following domain model with the Extension Builder. When you create a 1:n relation between Author and Book, the resulting database table for Book will contain a field which holds the UID of the author. To

TYPO3: How to configure plugin preview in Backend

心已入冬 提交于 2019-12-23 04:38:33
问题 In the backend I want to display some configurations of the plugin the editor has selected. Like in powermail or news plugin. How can this be achieved? 回答1: You'd apply the same logic as for a custom preview of any custom element: You can use PageTS to register a custom Fluid template: // Register preview for a custom content element mod.web_layout.tt_content.preview.my_content_element = EXT:my_ext/Resources/Private/Templates/Preview/MyContentElement.html // Register preview for a plugin mod

How do I write a routing aspect mapper for TYPO3 9 LTS

耗尽温柔 提交于 2019-12-23 03:09:15
问题 I need a custom aspect mapper class, to define the value of an optional get parameter. this parameter holds an cf_cache identifier with extra data. But this parameter produces a cHash parameter what i dont need, and dont want to see in the URL's. The docs (https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html) says: If the requirements are too loose, a URL signature parameter ("cHash") is added to the end of the URL which cannot be removed

TYPO3: Remove validation from ObjectStorage property in model

早过忘川 提交于 2019-12-22 14:57:10
问题 Does anyone knows if it is possible to remove recursive validation from model in extbase TYPO3? Let's say I have model with following properties: /** * @var string * @validate NotEmpty */ protected $title; /** * @var string * @validate NotEmpty */ protected $city; /** * @lazy * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<my/model/classname> */ protected $categories; When passing my object to controller action I want only title and city to be validated. I would like categories not to be