Typo3 FAL missing alternative text field in Extension - typo3

i am using FAL in my Extension and cant get the alternative field showing.
Please look at these 2 images to have a better view:
Image 1: This is the view in my extension
Image 2: This view is in Typo3 Page Ressource Tab
As you can see the image is working fine, so its not this problem: TYPO3 fal upload image with alt-text.
Here is my TCA code:
'images' => array(
'exclude' => 1,
'label' => 'LLL:EXT:fy_reference/Resources/Private/Language/locallang_db.xlf:tx_fyreference_domain_model_reference.images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
'minitems' => 0,
'maxitems' => 9999,
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),
'files' => array(
'exclude' => 1,
'label' => 'Files',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('files', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),
),
),
Any advise will be thankful.

Found the solution thanks to: TYPO3 FAL: enable Alt text and Link for custom domain field and https://forge.typo3.org/issues/56884
It seems that I have overread the answere.
Here is the complete TCA:
'images' => array(
'exclude' => 1,
'label' => 'LLL:EXT:fy_reference/Resources/Private/Language/locallang_db.xlf:tx_fyreference_domain_model_reference.images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array(
'foreign_selector_fieldTcaOverride' => array(
'config' => array(
'appearance' => array(
'elementBrowserType' => 'file',
'elementBrowserAllowed' => 'gif,jpg,jpeg,tif,tiff,bmp,png'
)
)
),
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference',
),
'minitems' => 0,
'maxitems' => 9999,
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
)
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),
'files' => array(
'exclude' => 1,
'label' => 'Files',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('files', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),
),
),
Important is to add these line:
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
)
If you also want to limit the upload files type, you could use this:
'foreign_selector_fieldTcaOverride' => array(
'config' => array(
'appearance' => array(
'elementBrowserType' => 'file',
'elementBrowserAllowed' => 'gif,jpg,jpeg,tif,tiff,bmp,png'
)
)
),
You will get this:

Related

sys_categories FAL image editor

I need to activate the "Image editor" for TYPO3 (8.7) sys_categories. In every other Element which uses FAL the editor is available. Only in the Category Images I did not have this option.
How do I active it?
I've tried to set the exact same TCA to this field but no changes.
Here is the TCA (of the tx_news) Extension:
'images' => [
'exclude' => true,
'l10n_mode' => 'mergeIfNotBlank',
'label' => $ll . 'tx_news_domain_model_category.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'images',
[
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
'showPossibleLocalizationRecords' => true,
'showRemovedLocalizationRecords' => true,
'showAllLocalizationLink' => true,
'showSynchronizationLink' => true
],
'foreign_match_fields' => [
'fieldname' => 'images',
'tablenames' => 'sys_category',
'table_local' => 'sys_file',
],
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
]
Also this file on GitHub: https://github.com/georgringer/news/blob/master/Configuration/TCA/Overrides/sys_category.php
You might compare your TCA with the configuration for field assets in record tt_content.
As the cropping is stored in sys_file_reference I would have a closer look to the showitem value "imageoverlayPalette"
Answer
The config index "foreign_types" were missing. Override the TCA settings like this and it works:
<?php
defined('TYPO3_MODE') or die();
$ll = 'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:';
$newSysCategoryColumns = [
'images' => [
'exclude' => true,
'label' => $ll . 'tx_news_domain_model_category.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'images',
[
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
'showPossibleLocalizationRecords' => true,
'showRemovedLocalizationRecords' => true,
'showAllLocalizationLink' => true,
'showSynchronizationLink' => true
],
'foreign_match_fields' => [
'fieldname' => 'images',
'tablenames' => 'sys_category',
'table_local' => 'sys_file',
],
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
)
),
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_category', $newSysCategoryColumns);

Remove Action & Controller from url - EXT:news & RealURL

I'm having trouble removing /news/story/ from my URL's when using ext:news and real url.
What I'd like is:
www.mysite.com/en/news/this-is-my-story-title
And not:
www.mysite.com/en/news/story/this-is-my-story-title
Current page structure:
-root(1)
--Home (2)
--News (3)
---Story (4)
This is my manual realurl conf:
<?php
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment';
$domain = 'mysite.com';
$rootPageUid = 1;
$rssFeedPageType = 9818; // pageType of your RSS feed page
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = [
'pagePath' => [
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '3',
'rootpage_id' => $rootPageUid,
'firstHitPathCache' => 1
],
'init' => [
'enableCHashCache' => true,
'respectSimulateStaticURLs' => 0,
'appendMissingSlash' => 'ifNotFile,redirect',
'adminJumpToBackend' => true,
'enableUrlDecodeCache' => true,
'enableUrlEncodeCache' => true,
'emptyUrlReturnValue' => '/',
],
'fileName' => [
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' => [
'feed.rss' => [
'keyValues' => [
'type' => $rssFeedPageType,
]
]
]
],
'preVars' => array(
0 => array(
'GETvar' => 'L',
'valueMap' => array(
'en' => 0,
'cy' => 1,
),
'noMatch' => 'bypass',
),
),
'fixedPostVars' => array(
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array(
'story' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array(
'news' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
)
)
),
'newsCategoryConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
'lookUpTable' => array(
'table' => 'sys_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
'newsTagConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_tag',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
'4' => 'newsDetailConfiguration', // ID of the page with the news plugin detail view
),
'postVarSets' => [
'_DEFAULT' => [
'controller' => [
[
'GETvar' => 'tx_news_pi1[action]',
'noMatch' => 'bypass'
],
[
'GETvar' => 'tx_news_pi1[controller]',
'noMatch' => 'bypass'
]
],
'dateFilter' => [
[
'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
],
[
'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
],
],
'page' => [
[
'GETvar' => 'tx_news_pi1[#widget_0][currentPage]',
],
],
],
],
];
Using TYPO3 v8.7.15,RealURL 2.3 and News v7.0.4
RealUrl is set to use my manual conf file also.
Thanks again T3 community
realUrl Provide pretty nice option to exclude a page from URL segment. For that go to Page-> property->General. You will find an option Exclude from speaking URL check this Screenshot.
In your case go to story page and exclude this from URL
-root(1)
--Home (2)
--News (3)
---Story (4) // Exclude from realUrl
That's it, this what you're actually looking for!
Greetings!

TYPO3 File Reference delete file and reference

How to delete the file and the file reference from this model?
I mean by code in controller. As far as I know there is no method to delete files.
The according TCA:
'backgroundimage' => array(
'label' => 'LLL:EXT:feusersplus/Resources/Private/Language/locallang_db.xlf:tx_feusersplus_domain_model_user.backgroundimage',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference'
),
'maxitems' => 1,
'foreign_match_fields' => array(
'fieldname' => 'backgroundimage',
'tablenames' => 'fe_users',
'table_local' => 'sys_file',
),
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
)
)
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])
),
),
The according Model:
/**
* backgroundimage
*
* #var \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
protected $backgroundimage = null;
I am using TYPO3 7.6.18
Thank you in advance
If you remove the file $file->getStorage()->deleteFile($file); the fileReference gets deleted automatically

typo3 news realurl overwriteDemand

I am using Typo3 7.1 + Fluid(Latest Integrated with 7.1) and I am very new to this latest version.
Added News plugin(tx_news) and using Categories. Categories are left menu and located in News List page as well as News Detail page.
I am getting url look like this,
http://domain.com/de/sample/?tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D=5&cHash=8aa8fd1fb7a5e47165a4e4acca3125e9
I don't know where I am doing mistake, I just wanted url like this, http://domain.com/de/sample/.
It is really helpful when anyone explain. Thanks in advance.
My Typoscript Settings in urltoolconf_realurl.php are,
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
'_DEFAULT' => array (
'init' => array (
'enableCHashCache' => '1',
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => '1',
'enableUrlEncodeCache' => '1',
),
'redirects' => array (
),
'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
'cs' => '2'
),
'noMatch' => 'bypass'
),
'2' => array (
'GETvar' => 'lang',
'valueMap' => array (
'de' => 'de',
),
'noMatch' => 'bypass',
),
),
'pagePath' => array (
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '7',
),
'fixedPostVars' => array (
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array(
'detail' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array(
'Legamaster' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
)
)
),
'newsCategoryConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
'lookUpTable' => array(
'table' => 'sys_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
'newsTagConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_tag',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
),
'postVarSets' => array (
'_DEFAULT' => array (
'article' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[year]',
),
try add
'fixedPostVars' => array(
...
'35' => 'newsDetailConfiguration', #change you id page with news detail plugin
'79' => 'newsTagConfiguration', # change you id page with news tag plugin if need
#'69' => 'newsCategoryConfiguration', # change you id page with news category plugin
),

TYPO3 news system and RealURL

I have a little problem with the TYPO3 extension News System and Real URL.
Its not showing the urls like
http://codem.dk/blog/artikel/usunde_energidrikke
but showing it like
http://codem.dk/blog/artikel/?tx_news_pi1[news]=5&cHash=5370a02c0dc7e653fede425de7ac9187
I have added the plugin code in my realurl file, so i don't know what's wrong, and all other links which are not linking to a news are working fine.
In the Extension Manager for Real Url I have this path to the configuration file:
typo3conf/realurl.php
Can someone see, what's wrong here?
Im running TYPO3 v. 6.1 with FLUID/EXTBASE.
The realurl.php file looks like this:
<?php
$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'pagePath' => array(
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '3',
'rootpage_id' => 1,
'firstHitPathCache'=>1
),
'init' => array(
'enableCHashCache' => TRUE,
'enableCHashCache' => 1,
'respectSimulateStaticURLs' => 0,
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1
),
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => array(
'en' => '1',
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'nc' => 1,
),
'noMatch' => 'bypass',
),
),
'fixedPostVars' => array(
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
)
)
),
'newsCategoryConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][categories]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_category',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
'newsTagConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][tags]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_tag',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-'
)
)
)
),
'52' => 'newsDetailConfiguration',
'701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well
'71' => 'newsTagConfiguration',
'72' => 'newsCategoryConfiguration',
),
'postVarSets' => array(
'_DEFAULT' => array(
'controller' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'noMatch' => 'bypass'
)
),
'dateFilter' => array(
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][year]',
),
array(
'GETvar' => 'tx_news_pi1[overwriteDemand][month]',
),
),
'page' => array(
array(
'GETvar' => 'tx_news_pi1[#widget_0][currentPage]',
),
),
),
),
);
?>
(Real URL Setup in Extension-manager)
I believe you have to edit the file ext_localconf.php in order to have real urls. Can you edit the file and add this code and tell me the results?
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['action'] = array(
array(
'GETvar' => 'tx_news_pi1[controller]',
),
array(
'GETvar' => 'tx_news_pi1[action]',
),
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['news'] = array(
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'title',
'alias_field' => 'name',
'addWhereClause' => 'AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
'enable404forInvalidAlias' => '1',
),
)
);
The file is located in root_folder/typo3conf/ext/news.
Note: Remember to clear cache right after you change and save the file.
To get title in your link instead of the uid (codem.dk/blog/artikel/news/5), change the following:
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',