Skip to content

Commit

Permalink
version 9.2.0: slug
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Jan 12, 2020
1 parent 6e9f04f commit 2f7c2ec
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 54 deletions.
62 changes: 31 additions & 31 deletions Configuration/TCA/tx_camaliga_domain_model_content.php
Expand Up @@ -34,7 +34,7 @@
$slugField2a[] = $field;
}
} else {
$slugField2a = $slugField1;
$slugField2a = $slugField2;
}
$slugFields[] = $slugField2a;
}
Expand Down Expand Up @@ -389,7 +389,7 @@
],
],
'title' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.title',
'config' => [
'type' => 'input',
Expand All @@ -398,14 +398,14 @@
],
],
'slug' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.slug',
'config' => [
'type' => 'slug',
'generatorOptions' => [
'fields' => $slugFields,
'fieldSeparator' => '/',
'prefixParentPageSlug' => true,
'fieldSeparator' => '_',
'prefixParentPageSlug' => false,
'replacements' => [
'/' => '',
'[' => '',
Expand All @@ -420,7 +420,7 @@
]
],
'shortdesc' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.shortdesc',
'config' => [
'type' => 'text',
Expand All @@ -430,7 +430,7 @@
],
],
'longdesc' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.longdesc',
'config' => [
'type' => 'text',
Expand All @@ -447,15 +447,15 @@
],
],
'link' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.link',
'config' => [
'type' => 'input',
'renderType' => 'inputLink',
],
],
$pre.'image' => [
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image',
'config' => $imgConfig1,
],
Expand All @@ -464,13 +464,13 @@

if (!$disableFurtherImages) {
$tcaArray['columns'][$pre.'image2'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image2',
'config' => $imgConfig2
);
if (!$enableFal)
$tcaArray['columns']['caption2'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption2',
'config' => array(
'type' => 'input',
Expand All @@ -479,13 +479,13 @@
),
);
$tcaArray['columns'][$pre.'image3'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image3',
'config' => $imgConfig3
);
if (!$enableFal)
$tcaArray['columns']['caption3'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption3',
'config' => array(
'type' => 'input',
Expand All @@ -494,13 +494,13 @@
),
);
$tcaArray['columns'][$pre.'image4'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image4',
'config' => $imgConfig4
);
if (!$enableFal)
$tcaArray['columns']['caption4'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption4',
'config' => array(
'type' => 'input',
Expand All @@ -509,13 +509,13 @@
),
);
$tcaArray['columns'][$pre.'image5'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.image5',
'config' => $imgConfig5
);
if (!$enableFal)
$tcaArray['columns']['caption5'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.caption5',
'config' => array(
'type' => 'input',
Expand All @@ -534,7 +534,7 @@

if (!$disableAddress) {
$tcaArray['columns']['street'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.street',
'config' => array(
'type' => 'input',
Expand All @@ -543,7 +543,7 @@
),
);
$tcaArray['columns']['zip'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.zip',
'config' => array(
'type' => 'input',
Expand All @@ -552,7 +552,7 @@
),
);
$tcaArray['columns']['city'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.city',
'config' => array(
'type' => 'input',
Expand All @@ -561,7 +561,7 @@
),
);
$tcaArray['columns']['country'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.country',
'config' => array(
'type' => 'input',
Expand All @@ -570,7 +570,7 @@
),
);
$tcaArray['columns']['latitude'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.latitude',
'config' => array(
'type' => 'input',
Expand All @@ -581,7 +581,7 @@
),
);
$tcaArray['columns']['longitude'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.longitude',
'config' => array(
'type' => 'input',
Expand All @@ -598,7 +598,7 @@

if (!$disableContact) {
$tcaArray['columns']['person'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.person',
'config' => array(
'type' => 'input',
Expand All @@ -607,7 +607,7 @@
),
);
$tcaArray['columns']['phone'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.phone',
'config' => array(
'type' => 'input',
Expand All @@ -616,7 +616,7 @@
),
);
$tcaArray['columns']['mobile'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.mobile',
'config' => array(
'type' => 'input',
Expand All @@ -625,7 +625,7 @@
),
);
$tcaArray['columns']['email'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.email',
'config' => array(
'type' => 'input',
Expand All @@ -640,7 +640,7 @@

if (!$disableCustom) {
$tcaArray['columns']['custom1'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom1',
'config' => array(
'type' => 'input',
Expand All @@ -649,7 +649,7 @@
),
);
$tcaArray['columns']['custom2'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom2',
'config' => array(
'type' => 'input',
Expand All @@ -658,7 +658,7 @@
),
);
$tcaArray['columns']['custom3'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.custom3',
'config' => array(
'type' => 'input',
Expand All @@ -673,7 +673,7 @@

if (!$disableMother) {
$tcaArray['columns']['mother'] = array(
'exclude' => 0,
'exclude' => true,
'label' => 'LLL:EXT:camaliga/Resources/Private/Language/locallang_db.xlf:tx_camaliga_domain_model_content.mother',
'config' => array(
'type' => 'group',
Expand Down
1 change: 1 addition & 0 deletions Documentation/Administration/Extension-Manager/Index.rst
Expand Up @@ -29,6 +29,7 @@ At the configuration in the extension-manager you can set some things:
because TYPO3 changes the image configuration only then. Furthermore: you can move images from /uploads to FAL
with a scheduler task. Read the chapter Administration → Scheduler-Tasks before you change a value!
The default value is to use the /uploads/tx_camaliga folder!
Note: using the uploads-folder is deprecated. This feature will be removed in version 10.0!

- You can make 2 settings for the extension ke_search. Both are important for the link-generation to one camaliga-entry::

Expand Down
5 changes: 3 additions & 2 deletions Documentation/Administration/Scheduler/Index.rst
Expand Up @@ -18,8 +18,9 @@
Scheduler-Tasks
^^^^^^^^^^^^^^^

- There are 4 Scheduler Tasks: import and export CSV files. You can configure many things in both tasks.
The third task can move images from the /uploads/tx_camaliga-folder to FAL.
- There are 4 scheduler Tasks: import and export CSV files. You can configure many things in this both tasks.

- The third scheduler task can move images from the /uploads/tx_camaliga-folder to FAL.
Please make a backup of the camaliga-table and your uploads-images before you switch to FAL!
After you have switched all your images to FAL, you need to tell Camaliga that it should use the FAL images.
Go to the extension manager and configure camaliga there. Click at the checkbox "Use images from FAL instead of images from uploads/".
Expand Down
11 changes: 7 additions & 4 deletions Documentation/Administration/Slug/Index.rst
Expand Up @@ -40,17 +40,20 @@ In this example the uid of a camaliga element is used after "more". Here another
extension: Camaliga
plugin: Pi1
routes:
- { routePath: '/entry/{camaliga_title}', _controller: 'Content::map', _arguments: {'camaliga_title': 'content'} }
defaultController: 'Content::show'
- { routePath: '/entry/{camaliga_title}', _controller: 'Content::show', _arguments: {'camaliga_title': 'content'} }
defaultController: 'Content::list'
aspects:
camaliga_title:
type: PersistedAliasMapper
tableName: 'tx_camaliga_domain_model_content'
routeFieldName: 'slug'

Note: if you want to use the slug field, make sure it is not empty! You can use a scheduler task of camaliga to create values for the slug field.
Note 1: if you want to use the slug field, make sure it is not empty! You can use a scheduler task of camaliga to create values for the slug field.

Here some not so good examples::
Note 2: if you have configured 2 fields for the slug-field, '_' or '-' is used as separator and not '/', because of this problem:
https://forge.typo3.org/issues/87333

Here some not so good / old examples::

routeEnhancers:
CamaligaPlugin:
Expand Down
8 changes: 5 additions & 3 deletions Documentation/Changelog/Index.rst
Expand Up @@ -18,9 +18,9 @@ ChangeLog

- Here you find all the changes through the versions.

========== ============================================================================================================================
========== ==============================================================================================================================
Version Changes
========== ============================================================================================================================
========== ==============================================================================================================================
0.1.0 Initial upload to TER.
0.1.2 Google PicasaWeb-Import and FancyBox-Template added. Documentation updated.
1.0.0 More TypoScript- and FlexForms-Settings. Carousel-Example updated.
Expand Down Expand Up @@ -201,5 +201,7 @@ Version Changes
Update-script is now deprecated and will be removed in version 10.0.
9.2.0 slug-field added. If you want to use, you should generate slugs via a scheduler task.
Switch to the QueryBuilder at the tasks.
exclude=1 at the backend-fields.
Bugfix: getLinkResolved.
========== ============================================================================================================================
Using the uploads-folder is now deprecated and will be removed in version 10.0. Switch to FAL (see Administration/Scheduler)!
========== ==============================================================================================================================
5 changes: 4 additions & 1 deletion Documentation/Index.rst
Expand Up @@ -37,7 +37,10 @@ EXT: Camaliga - carousel/map/list/gallery
`www.quizpalme.de <http://www.quizpalme.de/>`_

:Spachen:
`english Version <https://docs.typo3.org/p/quizpalme/camaliga/master/en-us/>`_, `deutsche Version <https://docs.typo3.org/p/quizpalme/camaliga/master/de-de/>`_
`english Version <https://docs.typo3.org/p/quizpalme/camaliga/master/en-us/>`_, `deutsche Version <https://docs.typo3.org/p/quizpalme/camaliga/master/de-de/>`_
Die deutsche Übersetzung ist nicht verfügbar, da die Admins von docs.typo3.org es nicht hinkriegen. Bis dahin gibt es die deutsche Doku nur bei GitHub:
https://github.com/bihor/camaliga/tree/master/Documentation/Localization.de_DE



.. toctree::
Expand Down
Expand Up @@ -30,6 +30,7 @@ Bei der Konfiguration im Extension-Manager kann man verschiedene Sachen einstell
Das ist sehr wichtig, damit TYPO3 die Bild-Konfiguration umstellt.
Lies das Kapitel Administration → Scheduler-Tasks, bevor du was umstellst!
Beachte weiterhin: die Standardeinstellung ist, den Ordner /uploads/tx_camaliga zu benutzen.
Deprecation: dieses Feature wird in Version 10.0 entfernt! Dann kann man den uploads-Ordner nicht mehr benutzen!

- Man kann einstellen, wie die Links zu einem Camaliga-Eintrag bei ke_search gebildet werden sollen::

Expand Down
11 changes: 7 additions & 4 deletions Documentation/Localization.de_DE/Administration/Slug/Index.rst
Expand Up @@ -40,17 +40,20 @@ In diesem Beispiel wird die uid eines Camaliga-Elements hinter "more" eingefügt
extension: Camaliga
plugin: Pi1
routes:
- { routePath: '/entry/{camaliga_title}', _controller: 'Content::map', _arguments: {'camaliga_title': 'content'} }
defaultController: 'Content::show'
- { routePath: '/eintrag/{camaliga_title}', _controller: 'Content::show', _arguments: {'camaliga_title': 'content'} }
defaultController: 'Content::list'
aspects:
camaliga_title:
type: PersistedAliasMapper
tableName: 'tx_camaliga_domain_model_content'
routeFieldName: 'slug'

Achtung: wenn man das slug-Feld benutzt, sollte man sicher sein, dass die slug-Felder auch befüllt sind. Dazu kann man einen Scheduler-Task von camaliga benutzen.
Achtung 1: wenn man das slug-Feld benutzt, sollte man sicher sein, dass die slug-Felder auch befüllt sind. Dazu kann man einen Scheduler-Task von camaliga benutzen.

Hier noch 2 nicht so schöne Beispiele::
Achtung 2: wenn man 2 Felder für das slug-Feld konfiguriert hat, wird '_' oder '-' statt '/' als Separator benutzt, wegen diesem Problem:
https://forge.typo3.org/issues/87333

Hier noch 2 nicht so schöne / alte Beispiele::

routeEnhancers:
CamaligaPlugin:
Expand Down
3 changes: 3 additions & 0 deletions Documentation/Localization.de_DE/Nderungen/Index.rst
Expand Up @@ -205,7 +205,10 @@ Version Änderungen
9.1.0 Neue Konfigurationsmöglichkeit: actionForLinks (für ke_search).
Bugfix: Thumbnail-Ansicht im Backend kann wieder sortiert werden.
Bugfix: AddPublicResourcesViewHelper.
Deprecation: das Update-Skript wird in Version 10 entfernt.
9.2.0 slug-Feld hinzugefügt. Bevor man es benutzt, sollte man den zugehörigen Scheduler-Task ausführen.
Wechsel zum QueryBuilder bei den Tasks.
exclude=1 bei den Backend-Feldern.
Bugfix: getLinkResolved.
Deprecation: der uploads-Ordner wird ab Version 10 nicht mehr unterstützt! Wechsele zu FAL (siehe Admin./Scheduler)!
========== =====================================================================================================================
4 changes: 3 additions & 1 deletion Documentation/Localization.de_DE/Updaten9/Index.rst
Expand Up @@ -39,4 +39,6 @@ noch ein ".title" bei catMMchildVal hinzufügen::
<f:then>{catMMchildVal.title}.</f:then><f:else>{catMMchildVal.title}, </f:else></f:if></f:for>

Grund: catMMchildVal von catMMval.childs ist jetzt ein Array (wie bei {content.categories}) und kein String mehr.
Verfügbar sind dabei: uid, title und description.
Verfügbar sind dabei: uid, title und description.

Deprecation: dieses Feature wird in Version 10.0 entfernt! Also das Skript noch mit Camaliga 9 ausführen!

0 comments on commit 2f7c2ec

Please sign in to comment.