Giter Club home page Giter Club logo

typo3-dynamic-routing-pages's Issues

Consider using a cache

In an environment with n sites having the same routing configuration there are n - 1 superflous sql queries.

Support lookup by doktype

We're using custom doktypes to provide fixed elements on websites, which may also be plugins.
That's why I suggest adding a "withDoktype" setting as well.

I'll be happy to provide a PR for that. :)

withPlugin should check on CType too

First off: nice extension ;-)

When playing around with it, I've noticed it's gathering too many pids though. E.g. of pages that had a news plugin in the past but the CE got changed to another CType.

So when checking for withPlugin it should probably check on CType='list' too.

a new option for CType

hi, tnx for the interesting idea.

While using your extension I got some more use case. I needed to set limitToPages set on CType. Do you think you can integrate this case into you extension? I can prepare a PR then.

    protected static function findDynamicPages(array $dynamicPagesConfiguration): array
    {
        $pageUids = [];
        if (isset($dynamicPagesConfiguration['withPlugin'])) {
            $withPlugins = is_array($dynamicPagesConfiguration['withPlugin']) ? $dynamicPagesConfiguration['withPlugin'] : [$dynamicPagesConfiguration['withPlugin']];
            array_push($pageUids, ...self::findPagesWithPlugins($withPlugins));
        }
        if (isset($dynamicPagesConfiguration['containsModule'])) {
            $containsModules = is_array($dynamicPagesConfiguration['containsModule']) ? $dynamicPagesConfiguration['containsModule'] : [$dynamicPagesConfiguration['containsModule']];
            array_push($pageUids, ...self::findPagesContainingModules($containsModules));
        }
        if (isset($dynamicPagesConfiguration['withSwitchableControllerAction'])) {
            $withSwitchableControllerActions = is_array($dynamicPagesConfiguration['withSwitchableControllerAction']) ? $dynamicPagesConfiguration['withSwitchableControllerAction'] : [$dynamicPagesConfiguration['withSwitchableControllerAction']];
            array_push($pageUids, ...self::findPagesWithSwitchableControllerActions($withSwitchableControllerActions));
        }
        if (isset($dynamicPagesConfiguration['withCType'])) {
            $withCType = is_array($dynamicPagesConfiguration['withCType']) ? $dynamicPagesConfiguration['withCType'] : [$dynamicPagesConfiguration['withCType']];
            array_push($pageUids, ...self::findPagesWithCType($withCType));
        }
        return array_unique($pageUids);
    }

    protected static function findPagesWithCType(array $withCType): array
    {
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
        $contentElementRecords = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->in('CType', $queryBuilder->createNamedParameter($withCType, Connection::PARAM_STR_ARRAY))
            )
            ->execute()
            ->fetchAll();
        return array_column($contentElementRecords, 'pid');
    }

Tag for current Version

Hello,
I want to ask, if it posible to set a tag for the current verison? So If the extension get an update for TYPO3 11 LTS it is still posible to install a version for TYPO3 10.
Thanks and Best Regards
Goldi42

Filter generated list by their sites?

Currently the generated limitPerPages properties are containing PIDs independent of the site they're belonging to. So the same PID shows up on all sites route enhancer configurations for (let's say) the news singlepage route enhancer.

Is that a problem?
Should that list be filtered?

Fix changes introduced by typo3-core-sa-2022-016

see https://typo3.org/security/advisory/typo3-core-sa-2022-016

  [ TYPO3\CMS\Core\Error\Exception ]                                                                                                  
  Warning: Declaration of Smic\DynamicRoutingPages\Xclass\SiteConfiguration::write(string $siteIdentifier, array $configuration): vo  
  id should be compatible with TYPO3\CMS\Core\Configuration\SiteConfiguration::write(string $siteIdentifier, array $configuration, b  
  ool $protectPlaceholders = false): void in /var/www/html/src/public/typo3conf/ext/dynamic_routing_pages/Classes/Xclass/SiteConfigu  
  ration.php line 39                                                                                                                  
                                      

TYPO3 12 support

Hi, i tested the branch task/typo3v12 but that is not compatible with version 12.

Fatal error: Declaration of Smic\DynamicRoutingPages\Xclass\SiteConfiguration::write(string $siteIdentifier, array $configuration): void must be compatible with TYPO3\CMS\Core\Configuration\SiteConfiguration::write(string $siteIdentifier, array $configuration, bool $protectPlaceholders = false): void in /var/www/html/vendor/smic/dynamic-routing-pages/Classes/Xclass/SiteConfiguration.php on line 39

Is there any plans by you?

Patch release?

Wow, guys, switching from a v10 compatible version to v11 should not get released as patch level version, please. Please respect Semantic Versioning. So it should be a version 2.0.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.