All Entries

TypoScript: show page title and make it translatable

On a certain part of my template I needed the page title - but the important thing is: not the nav_title, which was set as well. My first try:  temp.thePageTitle = TEXT temp.thePageTitle.data = DB:pages:33:title Unfortunately it was a multi-language-page and inserting it like this didn't ...

Read More

adding Wordpress custom widget multiple times overrides old values

A custom wordpress widget wouldn't work as soon as I inserted two or more of the widgets. Saving a value wrote them to all the widgets. The reason seems to be that I forgot to set a base ID in the parent constructor:  class CustomWidget extends WP_Widget { function __construct() {...

Read More

Realurl: generate the url using userFunc

I wanted to see if I was able to create my own urls using UserFunc because realUrl was not doing what it's supposed to do. Thats why I added the field "url" to my entry model, which realurl should use if it is set. If not, I want it to use the title field, cleaned up by realurl. To turn "This is a ...

Read More

add_menu_page creates an extra submenu item

When creating a new main menu item with add_menu_page in the wordpress admin interface, this automatically generates a first submenu item that has the same name as the main menu. Which looks like this:  To avoid this, it's necessary to set the same slug for the main navigation and the first ...

Read More

Backend Access Tab

LLL:EXT:cms/locallang_ttc.xlf:tabs.access is no longer the translation for the access tab. It is now LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access...

Read More

doctrine-dbal example

For this blog I needed the 10 most used tags (tag) with a count of the entries (entry) assigned to each tag. I used the chance to make myself familiar with doctrine-dbal, since with the upcoming TYPO3 9 the good old TYPO3_DB will no longer be available.  First the...

Read More

Typo3 8 - TCA select with too many options

Via TCA I wanted to create a select for fe_users within another entity. Unfortunately fe_users has quite a lot of entries in this case and therefore loading was a pain when trying to edit an entry. But type => group is a good alternative: 'user' => array( 'exclude' => 0, 'label' ...

Read More

typo3 8: create FileReference from Image

In a very old typo3 the images of my tx_members existed in the folder uploads/tx_members/ and were stored only as a filename in the database (logo_alt). To convert these files to FileReference images, I did the following. 1. created FileReference class FileReference extends ...

Read More

Typo3 8: debug queries

Seems like this has changed in the newest typo3 version, so I created a static function in my DebugService: public static function debugQuery($query){ $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'); $queryParser = ...

Read More

Typo3 8: styles.content.get -> white page

Using Typo3 8.7.0 I encountered the problem, that page.10.variables with styles.content.get resulted in an empty page as soon as there actually was any tt_content element. Turns out the problem is this: <f:layout name="Default" /> Seems like the layout must not be named Default, because ...

Read More
Search