Skip to content

Commit

Permalink
v 9.2.2: changes to categoriesAndChilds
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed May 1, 2020
1 parent 7c9f9b5 commit e808654
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 124 deletions.
10 changes: 7 additions & 3 deletions Classes/Domain/Repository/CategoryRepository.php
Expand Up @@ -94,7 +94,7 @@ public function getCategoriesAndParents($all_cats = [], $used_cats = []) {
$uid = $row['uid'];
$parent = $row['parent'];
if ((count($used_cats)==0) || ($used_cats[$uid])) {
if (($i==1 && $parentUids[$uid]==1) || ($i==2 && !$parentUids[$uid])) {
if (($i==1 && $parentUids[$uid]==1) || ($i==2)) { // && !$parentUids[$uid])) {
// In Durchgang 1 die Parents aufnehmen und in Durchgang 2 die Childs
if ($i==1) {
// nur parents sind dran
Expand All @@ -103,12 +103,16 @@ public function getCategoriesAndParents($all_cats = [], $used_cats = []) {
$cats[$uid]['uid'] = $uid;
$cats[$uid]['title'] = $row['title'];
$cats[$uid]['description'] = $row['description'];
} else {
// nur childs sind dran
#echo " # parent ".$row['title'];
} elseif (($i==2) && is_array($cats[$parent]) && $cats[$parent]['title']) {
// nur childs und tiefer gelegene parents sind dran
$cats[$parent]['childs'][$uid] = [];
$cats[$parent]['childs'][$uid]['uid'] = $uid;
$cats[$parent]['childs'][$uid]['title'] = $row['title'];
$cats[$parent]['childs'][$uid]['description'] = $row['description'];
//echo " # child/deeper parent: ".$row['title'].'='.$parentUids[$uid].'/'.$cats[$parent]['title'];
} elseif ($i==2) {
//echo " # no child: ".$row['title'];
}
}
}
Expand Down
54 changes: 27 additions & 27 deletions Documentation/Administration/Categories/Index.rst
@@ -1,28 +1,28 @@


.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. ==================================================
.. DEFINE SOME TEXTROLES
.. --------------------------------------------------
.. role:: underline
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)


Categories
^^^^^^^^^^

- This extension uses the normal TYPO3 categories. There are different ways to use this categories.
In {categories} are all categories and childs. You can use this in your template to see them::
<f:debug>{categories}</f:debug>

- With {content.categories} you can display only the used categories.
With {content.categoriesAndParents} you can display only the used categories with their parents.


.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. ==================================================
.. DEFINE SOME TEXTROLES
.. --------------------------------------------------
.. role:: underline
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)


Categories
^^^^^^^^^^

- This extension uses the normal TYPO3 categories. There are different ways to use this categories.
In {categories} are all categories and childs. You can use this in your template to see them::
<f:debug>{categories}</f:debug>

- With {content.categories} you can display only the used categories.
With {content.categoriesAndParents} you can display only the used categories with their parents.
Both variables are arrays. They contain this values/strings: uid, title and description.
8 changes: 4 additions & 4 deletions Documentation/Administration/Extended-Templates/Index.rst
Expand Up @@ -28,7 +28,7 @@ Since camaliga 5.0.0 there are now three ways to use these extended templates /
which functioned according to this principle, but which are no longer available for selection and will be completely
removed in version 6.0.0. Therefore, you should now read further.

- The (new) extended Google Maps template will never be cached at all, which is why it does not need the parameter no_cache = 1 .
- The extended Google Maps template will never be cached at all, which is why it does not need the parameter no_cache = 1 .
The template does not mean as before MapExtended.html but search.html. The search form is integrated there via a partial.
Anyone who does not need a caching or everyone who is not like other solutions should use the Search template.
One can certainly use it for anything.
Expand Down Expand Up @@ -70,15 +70,15 @@ And so looks a finished example of the variant 3, which can be installed in almo
</f:if>

After you have installed that in your template, you still need the Partial "Options". That one of the typo3conf folder
can be used or you can also copy it in the fileadmin folder. The path to the Partial can be set like this:
can be used or you can also copy it in the fileadmin folder. The path to the Partial can be set like this in TypoScript setup:

::

plugin.tx_camaliga.view.partialRootPath = fileadmin/templates/Partials/
plugin.tx_camaliga.view.partialRootPaths.1 = fileadmin/templates/Partials/

Note: the RealUrl-documentation says, that there should no cHash for plugins that are not chacheable.
You can add noCacheHash="true" to your f:form, but then the search will not work anymore. Bad advice.
But you can fix this problem if you create an new search page and add the pageUid to your search form.
But you can fix this problem if you create a new search page and add the pageUid to your search form.
New example:

::
Expand Down
1 change: 1 addition & 0 deletions Documentation/Changelog/Index.rst
Expand Up @@ -204,4 +204,5 @@ Version Changes
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)!
9.2.2 Bugfix: categoriesAndParents contains now again deeper parents in the child list.
========== ==============================================================================================================================
Expand Up @@ -28,7 +28,7 @@ Seit camaliga 5.0.0 gibt es nun drei Möglichkeiten, diese erweiterten Templates
Bis zur Version 4.0.0 gab es noch mehr Templates, die nach diesem Prinzip funktionierten, aber die werden nicht mehr
zur Auswahl angeboten und werden in der Version 6.0.0 komplett entfernt. Deshalb sollte man jetzt noch weiter lesen.

- Das (neue) erweiterte Google-Karten/Maps-Template wird überhaupt nie gecached, weshalb man dort den no_cache=1 Parameter nicht braucht.
- Das erweiterte Google-Karten/Maps-Template wird überhaupt nie gecached, weshalb man dort den no_cache=1 Parameter nicht braucht.
Das Template heisst nicht wie früher MapExtended.html, sondern Search.html. Das Suchformular wird dort über ein Partial eingebunden.
Jeder, der kein Caching braucht oder jeder, dem die anderen Lösungen nicht gefallen, sollte das Search-Template benutzen.
Man kann es freilich für alles benutzen.
Expand Down Expand Up @@ -71,11 +71,11 @@ Und so sieht ein fertiges Beispiel der Variante 3 aus, welches man in fast jedes
</f:if>

Nachdem man das in sein Template eingebaut hat, braucht man noch das Partial "Options", dass man aus dem typo3conf-Ordner
benutzen kann oder auch in den fileadmin-Ordner kopieren kann. Den Pfad zum Partial gibt man so an:
benutzen kann oder auch in den fileadmin-Ordner kopieren kann. Den Pfad zum Partial gibt man so an via TypoScript-Setup:

::

plugin.tx_camaliga.view.partialRootPath = fileadmin/templates/Partials/
plugin.tx_camaliga.view.partialRootPaths.1 = fileadmin/templates/Partials/

Beachte: die RealUrl-Doku sagt, dass man die Generierung des cHash bei nicht cache-baren Plugins ausschalten sollte.
Nun kann man noch zum f:form noCacheHash="true" hinzufügen, aber dann funktioniert die Suche nicht mehr.
Expand Down
@@ -1,28 +1,28 @@


.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. ==================================================
.. DEFINE SOME TEXTROLES
.. --------------------------------------------------
.. role:: underline
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)


Kategorien
^^^^^^^^^^

- Diese Extension benutzt die normalen TYPO3-Kategorien. Es gibt verschiedene Arten diese zu benutzen.
In {categories} sind alle Kategorien und deren Kinder zu sehen. Man kann sich das Array so im Template ansehen::
<f:debug>{categories}</f:debug>

- Mit {content.categories} kann man die markierten Kategorien anzeigen.
Mit {content.categoriesAndParents} kann man die markierten Kategorien und deren Mutter-Kategorie anzeigen.


.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. ==================================================
.. DEFINE SOME TEXTROLES
.. --------------------------------------------------
.. role:: underline
.. role:: typoscript(code)
.. role:: ts(typoscript)
:class: typoscript
.. role:: php(code)


Kategorien
^^^^^^^^^^

- Diese Extension benutzt die normalen TYPO3-Kategorien. Es gibt verschiedene Arten diese zu benutzen.
In {categories} sind alle Kategorien und deren Kinder zu sehen. Man kann sich das Array so im Template ansehen::
<f:debug>{categories}</f:debug>

- Mit {content.categories} kann man die markierten Kategorien anzeigen.
Mit {content.categoriesAndParents} kann man die markierten Kategorien und deren Mutter-Kategorie anzeigen.
Beide Variablen sind Arrays. Sie enthalten diese Werte/Strings: uid, title und description.
1 change: 1 addition & 0 deletions Documentation/Localization.de_DE/Nderungen/Index.rst
Expand Up @@ -211,4 +211,5 @@ Version Änderungen
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)!
9.2.2 Bugfix: categoriesAndParents enthält nun wieder auch tiefer gelegene "parents" bei den "childs".
========== =====================================================================================================================
4 changes: 1 addition & 3 deletions Documentation/Localization.de_DE/Todo-liste/Index.rst
Expand Up @@ -20,6 +20,4 @@ ToDo-Liste

- Bekannte Probleme lösen.

- Das Camaliga-jQuery-Plugin erweitern.

- Die Thumbnail-Liste im Backend wieder sortierbar machen.
- Das Camaliga-jQuery-Plugin erweitern.
4 changes: 1 addition & 3 deletions Documentation/To-doList/Index.rst
Expand Up @@ -20,6 +20,4 @@ To-Do list

- Fix the known problems.

- Extend the camaliga-jQuery-plugin.

- Repair the thumbnail-list in the backend.
- Extend the camaliga-jQuery-plugin.
32 changes: 16 additions & 16 deletions README.md
@@ -1,16 +1,16 @@
# camaliga

version 9.2.1

A carousel/gallery/map/list extension that can use the TYPO3 categories and different jQuery-plugins like Slick or Isotope.
Bootstrap support. Indexer for ke_search. Many features.

You find the documentation at docs.typo3.org:
https://docs.typo3.org/p/quizpalme/camaliga/master/en-us/
and
https://docs.typo3.org/p/quizpalme/camaliga/master/de-de/
(currently broken due to a problem at docs.typo3.org).
Bis die Admins von docs.typo3.org den Fehler beheben (worauf anscheinend da niemand Lust drauf hat), kann man sich durch die deutsche Anleitung auch hier durchklicken:
https://github.com/bihor/camaliga/tree/master/Documentation/Localization.de_DE

Last feature: documentation.
# camaliga

version 9.2.2

A carousel/gallery/map/list extension that can use the TYPO3 categories and different jQuery-plugins like Slick or Isotope.
Bootstrap support. Indexer for ke_search. Many features.

You find the documentation at docs.typo3.org:
https://docs.typo3.org/p/quizpalme/camaliga/master/en-us/
and
https://docs.typo3.org/p/quizpalme/camaliga/master/de-de/
(currently broken due to a problem at docs.typo3.org).
Bis die Admins von docs.typo3.org den Fehler beheben (worauf anscheinend da niemand Lust drauf hat), kann man sich durch die deutsche Anleitung auch hier durchklicken:
https://github.com/bihor/camaliga/tree/master/Documentation/Localization.de_DE

Last feature: Bugfix: categoriesAndParents contains now again deeper parents in the child list.
76 changes: 38 additions & 38 deletions ext_emconf.php
@@ -1,38 +1,38 @@
<?php

/***************************************************************
* Extension Manager/Repository config file for ext "camaliga".
*
* Auto generated 22-01-2018 16:07
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = array (
'title' => 'Camaliga: CArousel/MAp/LIst/GAllery',
'description' => 'A carousel/gallery/map/list extension that can use the TYPO3 categories and different jQuery-plugins like Slick or Isotope. Bootstrap support. Indexer for ke_search. Many features!',
'category' => 'plugin',
'version' => '9.2.1',
'state' => 'stable',
'uploadfolder' => true,
'createDirs' => '',
'clearcacheonload' => false,
'author' => 'Kurt Gusbeth',
'author_email' => 'info@quizpalme.de',
'author_company' => 'fixpunkt werbeagentur gmbh',
'constraints' =>
array (
'depends' =>
array (
'typo3' => '9.5.0-9.5.99',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
);
<?php

/***************************************************************
* Extension Manager/Repository config file for ext "camaliga".
*
* Auto generated 22-01-2018 16:07
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = array (
'title' => 'Camaliga: CArousel/MAp/LIst/GAllery',
'description' => 'A carousel/gallery/map/list extension that can use the TYPO3 categories and different jQuery-plugins like Slick or Isotope. Bootstrap support. Indexer for ke_search. Many features!',
'category' => 'plugin',
'version' => '9.2.2',
'state' => 'stable',
'uploadfolder' => true,
'createDirs' => '',
'clearcacheonload' => false,
'author' => 'Kurt Gusbeth',
'author_email' => 'info@quizpalme.de',
'author_company' => 'fixpunkt werbeagentur gmbh',
'constraints' =>
array (
'depends' =>
array (
'typo3' => '9.5.0-9.5.99',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
);

0 comments on commit e808654

Please sign in to comment.