[FEATURE] Add option to respect request uri on show sitemap. 72/45572/2 master
authorKai Ratzeburg <hello@kai-ratzeburg.de>
Mon, 4 Jan 2016 14:39:57 +0000 (15:39 +0100)
committerPatrick Schriner <patrick.schriner@diemedialen.de>
Mon, 4 Jan 2016 15:48:38 +0000 (16:48 +0100)
And a couple of bugfixes...

Change-Id: Ibb86117a600dca46ee719a3220fcd9791b507dc3

15 files changed:
Classes/Utility/SitemapRenderer.php
Configuration/TCA/Sitemap.php [deleted file]
Configuration/TCA/tx_dynamicgooglesitemap_domain_model_sitemap.php [new file with mode: 0644]
Documentation/Administrator/Index.rst
Documentation/ChangeLog/Index.rst
Resources/Private/Language/de.locallang.xlf
Resources/Private/Language/de.locallang_csh_tx_dmgooglesitemap_domain_model_sitemap.xlf
Resources/Private/Language/locallang.xlf
Resources/Private/Language/locallang_csh_tx_dmgooglesitemap_domain_model_sitemap.xlf
Resources/Private/Language/locallang_db.xlf
Resources/Private/Language/locallang_pagelist.xlf
ext_conf_template.txt
ext_icon.png [new file with mode: 0644]
ext_localconf.php
ext_tables.php

index 8135c6c..1a72b92 100644 (file)
@@ -60,6 +60,19 @@ class SitemapRenderer {
                $orderBy = $this->field[$confArray['sorting']];
                $respectNoSearch = (boolean) $confArray['respectNoSearch'];
 
+               $respectRequestPath = '';
+               if ((boolean)$confArray['respectRequestPath']) {
+                       $requestPath = preg_replace(
+                               '/\?.*/',
+                               '',
+                               str_replace('index.php', '', ltrim(GeneralUtility::getIndpEnv('REQUEST_URI'), '/'))
+                       );
+                       if (!empty($requestPath)) {
+                               $requestPath = $GLOBALS['TYPO3_DB']->quoteStr('/' . $requestPath, Sitemap::TABLE);
+                               $respectRequestPath = ' AND s.request_uri LIKE "' . $requestPath . '%"';
+                       }
+               }
+
                $noSearchSql = '';
                if($respectNoSearch) {
                        $noSearchSql = ' AND p.no_search = 0';
@@ -70,7 +83,7 @@ class SitemapRenderer {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                        '*', 
                        'pages p, ' . Sitemap::TABLE . ' s',
-                       'p.uid = s.for_page AND http_host = "' . $httpHost . '"' . $respectEnableFields . $noSearchSql,
+                       'p.uid = s.for_page AND s.http_host = "' . $httpHost . '"' . $respectRequestPath . $respectEnableFields . $noSearchSql,
                        '', // Group By
                        $orderBy
                );
diff --git a/Configuration/TCA/Sitemap.php b/Configuration/TCA/Sitemap.php
deleted file mode 100644 (file)
index 95394bc..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
-}
-
-$TCA['tx_dynamicgooglesitemap_domain_model_sitemap'] = array(
-       'ctrl' => $TCA['tx_dynamicgooglesitemap_domain_model_sitemap']['ctrl'],
-       'interface' => array(
-               'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, for_page, http_host, request_uri, content_hash, url_params, priority, lastmod, lang_key',
-       ),
-       'types' => array(
-               '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, for_page, http_host, request_uri, content_hash,  url_params, priority, lastmod, lang_key'),
-       ),
-       'palettes' => array(
-               '1' => array('showitem' => ''),
-       ),
-       'columns' => array(
-               'sys_language_uid' => array(
-                       'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
-                       'config' => array(
-                               'type' => 'select',
-                               'foreign_table' => 'sys_language',
-                               'foreign_table_where' => 'ORDER BY sys_language.title',
-                               'items' => array(
-                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
-                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
-                               ),
-                       ),
-               ),
-               'l10n_parent' => array(
-                       'displayCond' => 'FIELD:sys_language_uid:>:0',
-                       'exclude' => 1,
-                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
-                       'config' => array(
-                               'type' => 'select',
-                               'items' => array(
-                                       array('', 0),
-                               ),
-                               'foreign_table' => 'tx_dynamicgooglesitemap_domain_model_sitemap',
-                               'foreign_table_where' => 'AND tx_dynamicgooglesitemap_domain_model_sitemap.pid=###CURRENT_PID### AND tx_dynamicgooglesitemap_domain_model_sitemap.sys_language_uid IN (-1,0)',
-                       ),
-               ),
-               'l10n_diffsource' => array(
-                       'config' => array(
-                               'type' => 'passthrough',
-                       ),
-               ),
-               't3ver_label' => array(
-                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 30,
-                               'max' => 255,
-                       )
-               ),
-               'for_page' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.for_page',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 4,
-                               'eval' => 'int'
-                       ),
-               ),
-               'http_host' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 255,
-                               'eval' => 'trim,required'
-                       ),
-               ),
-               'request_uri' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 255,
-                               'eval' => 'trim,required'
-                       ),
-               ),
-               'content_hash' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 32,
-                               'eval' => 'trim,required'
-                       ),
-               ),
-               'lang_key' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 10,
-                               'eval' => 'trim,required'
-                       ),
-               ),
-               'url_params' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url_params',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 255,
-                               'eval' => 'trim'
-                       ),
-               ),
-               'priority' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.priority',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 4,
-                               'eval' => 'int'
-                       ),
-               ),
-               'lastmod' => array(
-                       'exclude' => 0,
-                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.lastmod',
-                       'config' => array(
-                               'type' => 'input',
-                               'size' => 7,
-                               'eval' => 'date',
-                               'checkbox' => 1,
-                               'default' => time()
-                       ),
-               ),
-       ),
-);
diff --git a/Configuration/TCA/tx_dynamicgooglesitemap_domain_model_sitemap.php b/Configuration/TCA/tx_dynamicgooglesitemap_domain_model_sitemap.php
new file mode 100644 (file)
index 0000000..0c92c3a
--- /dev/null
@@ -0,0 +1,144 @@
+<?php
+if (!defined ('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+return array(
+       'ctrl' => array(
+               'title' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap',
+               'label' => 'for_page',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'dividers2tabs' => TRUE,
+               'origUid' => 't3_origuid',
+               'languageField' => 'sys_language_uid',
+               'transOrigPointerField' => 'l10n_parent',
+               'transOrigDiffSourceField' => 'l10n_diffsource',
+               'searchFields' => 'for_page,url,priority,lastmod,lastmod_hash,',
+               'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('dynamicgooglesitemap') . 'Resources/Public/Icons/tx_dynamicgooglesitemap_domain_model_sitemap.gif'
+       ),
+       'interface' => array(
+               'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, for_page, http_host, request_uri, content_hash, url_params, priority, lastmod, lang_key',
+       ),
+       'types' => array(
+               '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, for_page, http_host, request_uri, content_hash,  url_params, priority, lastmod, lang_key'),
+       ),
+       'palettes' => array(
+               '1' => array('showitem' => ''),
+       ),
+       'columns' => array(
+               'sys_language_uid' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
+                       'config' => array(
+                               'type' => 'select',
+                               'foreign_table' => 'sys_language',
+                               'foreign_table_where' => 'ORDER BY sys_language.title',
+                               'items' => array(
+                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
+                                       array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
+                               ),
+                       ),
+               ),
+               'l10n_parent' => array(
+                       'displayCond' => 'FIELD:sys_language_uid:>:0',
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('', 0),
+                               ),
+                               'foreign_table' => 'tx_dynamicgooglesitemap_domain_model_sitemap',
+                               'foreign_table_where' => 'AND tx_dynamicgooglesitemap_domain_model_sitemap.pid=###CURRENT_PID### AND tx_dynamicgooglesitemap_domain_model_sitemap.sys_language_uid IN (-1,0)',
+                       ),
+               ),
+               'l10n_diffsource' => array(
+                       'config' => array(
+                               'type' => 'passthrough',
+                       ),
+               ),
+               't3ver_label' => array(
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'max' => 255,
+                       )
+               ),
+               'for_page' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.for_page',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 4,
+                               'eval' => 'int'
+                       ),
+               ),
+               'http_host' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.http_host',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 255,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'request_uri' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 255,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'content_hash' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.content_hash',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 32,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'lang_key' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.lang_key',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 10,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'url_params' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.url_params',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 255,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'priority' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.priority',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 4,
+                               'eval' => 'int'
+                       ),
+               ),
+               'lastmod' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap.lastmod',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 7,
+                               'eval' => 'date',
+                               'checkbox' => 1,
+                               'default' => time()
+                       ),
+               ),
+       ),
+);
index a485b92..ecbeb19 100644 (file)
@@ -36,19 +36,31 @@ Configuration
 
 The main configuration is handled on the Extension Manager Configuration page of the extension.
 
-**Ignor Parameters** (``basic.ignorParams``)
-   
+**Ignore Parameters** (``basic.ignoreParams``)
+
    Since the extension identifies an entry by `pid`, `url params` and `language` it might be required to ignore some of the parameters. Parameters that are random or don't change the content of the page can be added here in a comma seperated list.
 
+**Ignore Page Type** (``basic.ignorePageType``)
+
+   Ignore pages of this type.
+
 **Sort Sitemap by Field** (``basic.sorting``)
-   
+
    Here you can choose how the sitemap should be sorted:
-   
+
 * ``UID`` : this is the uid of the page.
 * ``PageTitle`` : Alphabetical by page title.
 * ``URL`` : Alphabetical by URL.
 * ``LastChanged`` : Sort from newest to oldest changed page.
-   
+
+**Respect ``no_search``** (``basic.respectNoSearch``)
+
+   If set, ``no_search`` is respected for pages. Pages that should not be found in searches are not shown in the sitemap either.
+
+**Respect Reqest Path** (``basic.respectRequestPath``)
+
+   If set you can generate partial sitemaps by calling the eid on a particular page. Note that this will currently only work if you are using realurl or a comparable rewrite utility.
+
 .. important::
 
    If your site is multilingual: Make sure that your typoscript configuration is correct.
index dca09cb..6f72d24 100644 (file)
@@ -14,6 +14,9 @@ ChangeLog
 +----------------+----------+-----------------------------------------------------------------------------------------------------------------------------------------------+
 | Date           | Version  | Description                                                                                                                                   |
 +================+==========+===============================================================================================================================================+
+| 2016-01-04     | 0.9.5    | * Several bugfixes                                                                                                                            |
+|                |          | * New extension configuration option to generate partial sitemaps                                                                             |
++================+==========+===============================================================================================================================================+
 | 2014-11-05     | 0.9.2    | * Removing CDATA wrapper form <loc> tag.                                                                                                      |
 |                |          | * Respect https protocol.                                                                                                                     |
 |                |          | * Ignoring Pages that are opened by Preview.                                                                                                  |
index b2a28e9..e5f769a 100644 (file)
@@ -3,7 +3,6 @@
        <file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2014-06-30T12:00:00Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap">
                                <source>Sitemap</source>
                                <target>Sitemap</target>
@@ -52,7 +51,7 @@
                                <target>Alle Sitemap einträge wurden entfernt.</target>
                        </trans-unit>
                        
-                       <trans-unit id="config.ignorParams">
+                       <trans-unit id="config.ignoreParams">
                                <source>Ignor Parameters (Comma separated List)</source>
                                <target>Ignoriere Parameter (Kommata getrennte Liste)</target>
                        </trans-unit>
                                <source>Sort Sitemap by Field</source>
                                <target>Sortiere Sitemap by Feld</target>
                        </trans-unit>
-                       <trans-unit id="config.nosearch">
+                       <trans-unit id="config.respectNoSearch">
                                <source>Respect 'Include in Search' field from page properties</source>
                                <target>Respektiere 'In Indexsuche einbeziehen' Feld von Seiteneigenschaften</target>
                        </trans-unit>
-                       
+                       <trans-unit id="config.respectRequestPath">
+                               <source>Respect request uri</source>
+                               <target>Respektiere URL-Pfad beim Sitemap-Aufruf</target>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
\ No newline at end of file
index 16b7799..40ca514 100644 (file)
@@ -3,7 +3,6 @@
        <file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2014-06-30T12:00:00Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-
                        <trans-unit id="for_page.description">
                                <source>The coresponding page ID</source>
                                <target>Die entsprechende Seite ID</target>
@@ -18,7 +17,7 @@
                        </trans-unit>
                        <trans-unit id="lastmod.description">
                                <source>Date when the content of the url was last changed.</source>
-                               <target>Datum wenn die Seite zu lätzt gehändert wurde.</target>
+                               <target>Letztes Änderungsdatum der Seite.</target>
                        </trans-unit>
                        <trans-unit id="lastmod_hash.description">
                                <source>Hash for monitoring changes of the page</source>
index 42e9c6b..3efb9a0 100644 (file)
@@ -3,7 +3,6 @@
        <file source-language="en" datatype="plaintext" original="messages" date="2014-02-13T11:46:43Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap">
                                <source>Sitemap</source>
                        </trans-unit>
@@ -53,7 +52,9 @@
                        <trans-unit id="config.nosearch">
                                <source>Respect 'Include in Search' field from page properties</source>
                        </trans-unit>
-                       
+                       <trans-unit id="config.respectRequestPath">
+                               <source>Respect request uri</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
\ No newline at end of file
index 62aa5ab..041a303 100644 (file)
@@ -3,7 +3,6 @@
        <file source-language="en" datatype="plaintext" original="messages" date="2014-02-13T11:46:43Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-
                        <trans-unit id="for_page.description">
                                <source>The coresponding page ID</source>
                        </trans-unit>
index 2ac5541..ac0e043 100644 (file)
@@ -3,26 +3,36 @@
        <file source-language="en" datatype="plaintext" original="messages" date="2014-02-13T11:46:43Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap">
                                <source>Sitemap</source>
                        </trans-unit>
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.for_page">
                                <source>For Page</source>
                        </trans-unit>
+                       <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.http_host">
+                               <source>HTTP Host</source>
+                       </trans-unit>
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.url">
                                <source>Url</source>
                        </trans-unit>
+                       <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.lang_key">
+                               <source>Language key</source>
+                       </trans-unit>
+                       <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.content_hash">
+                               <source>Content hash</source>
+                       </trans-unit>
+                       <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.url_params">
+                               <source>Url parameters</source>
+                       </trans-unit>
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.priority">
                                <source>Priority</source>
                        </trans-unit>
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.lastmod">
-                               <source>Lastmod</source>
+                               <source>Last modified</source>
                        </trans-unit>
                        <trans-unit id="tx_dynamicgooglesitemap_domain_model_sitemap.lastmod_hash">
-                               <source>Lastmod Hash</source>
+                               <source>Last modified Hash</source>
                        </trans-unit>
-
                </body>
        </file>
 </xliff>
\ No newline at end of file
index f037cdf..34eed80 100644 (file)
@@ -3,7 +3,6 @@
        <file source-language="en" datatype="plaintext" original="messages" date="2014-02-13T11:46:43Z" product-name="dynamicgooglesitemap">
                <header/>
                <body>
-                       
             <trans-unit id="mlang_tabs_tab">
                                <source>Google Sitemap</source>
                        </trans-unit>
index 090d15d..3a7ef33 100644 (file)
@@ -1,11 +1,14 @@
 # cat=Basic//10; type=input; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.ignoreParams
 ignoreParams = L, cHash
 
-# cat=Basic//10; type=input; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.ignorePageType
+# cat=Basic//20; type=input; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.ignorePageType
 ignorePageType = 98
 
-# cat=Basic//20; type=options[UID,PageTitle,URL,LastChanged]; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.sorting
+# cat=Basic//30; type=options[UID,PageTitle,URL,LastChanged]; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.sorting
 sorting = uid
 
-# cat=Basic//30; type=boolean; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.nosearch
+# cat=Basic//40; type=boolean; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.respectNoSearch
 respectNoSearch = 1
+
+# cat=Basic//50; type=boolean; label=LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang.xlf:config.respectRequestPath
+respectRequestPath = 0
\ No newline at end of file
diff --git a/ext_icon.png b/ext_icon.png
new file mode 100644 (file)
index 0000000..131d5c7
Binary files /dev/null and b/ext_icon.png differ
index fedc04e..e742243 100644 (file)
@@ -4,4 +4,4 @@ if (!defined ('TYPO3_MODE')) {
 }
 
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dynamicgooglesitemap'] = 'EXT:dynamicgooglesitemap/Classes/Utility/SitemapRenderer.php';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess']['get_page_data'] = 'EXT:dynamicgooglesitemap/Classes/Utility/PageData.php:DieMedialen\\Dynamicgooglesitemap\\Utility\\PageData->getData';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess']['get_page_data'] = 'DieMedialen\\Dynamicgooglesitemap\\Utility\\PageData->getData';
index b86d481..683f186 100644 (file)
@@ -3,6 +3,12 @@ if (!defined('TYPO3_MODE')) {
        die ('Access denied.');
 }
 
+if (\TYPO3\CMS\Core\Utility\GeneralUtility::compat_version('7.6')) {
+    $moduleIcon = 'EXT:' . $_EXTKEY . '/ext_icon.png';
+} else {
+    $moduleIcon = 'EXT:' . $_EXTKEY . '/ext_icon.gif';
+}
+
 if (TYPO3_MODE === 'BE') {
        /**
         * Registers a Backend Module
@@ -10,36 +16,21 @@ if (TYPO3_MODE === 'BE') {
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
                'DieMedialen.' . $_EXTKEY,
                'web',   // Make module a submodule of 'web'
-               'pagelist',     // Submodule key
+               'dynamicgooglesitemap', // Submodule key
                '',                                             // Position
                array(
                        'Sitemap' => 'list, edit, update, delete, deleteAll',
                ),
                array(
                        'access' => 'user,group',
-                       'icon'   => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
+                       'icon'   => $moduleIcon,
                        'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_pagelist.xlf',
                )
        );
 }
+unset($moduleIcon);
 
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Google Sitemap');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_dynamicgooglesitemap_domain_model_sitemap', 'EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_csh_tx_dynamicgooglesitemap_domain_model_sitemap.xlf');
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_dynamicgooglesitemap_domain_model_sitemap');
 
-$TCA['tx_dynamicgooglesitemap_domain_model_sitemap'] = array(
-       'ctrl' => array(
-               'title' => 'LLL:EXT:dynamicgooglesitemap/Resources/Private/Language/locallang_db.xlf:tx_dynamicgooglesitemap_domain_model_sitemap',
-               'label' => 'for_page',
-               'crdate' => 'crdate',
-               'cruser_id' => 'cruser_id',
-               'dividers2tabs' => TRUE,
-               'origUid' => 't3_origuid',
-               'languageField' => 'sys_language_uid',
-               'transOrigPointerField' => 'l10n_parent',
-               'transOrigDiffSourceField' => 'l10n_diffsource',
-               'searchFields' => 'for_page,url,priority,lastmod,lastmod_hash,',
-               'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Sitemap.php',
-               'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_dynamicgooglesitemap_domain_model_sitemap.gif'
-       ),
-);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_dynamicgooglesitemap_domain_model_sitemap');
\ No newline at end of file