Skip to content

Commit a937e6e

Browse files
committed
more adjustments
1 parent 5cb40de commit a937e6e

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

config/.env.ddev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export DATABASE_URL="mysql://db:db@db:3306/db"
3636
# Uncomment these to define logging configuration via environment variables.
3737
#export LOG_DEBUG_URL="file:///path/to/logs/?levels[]=notice&levels[]=info&levels[]=debug&file=debug"
3838
#export LOG_ERROR_URL="file:///path/to/logs/?levels[]=warning&levels[]=error&levels[]=critical&levels[]=alert&levels[]=emergency&file=error"
39-
export DEBUG_KIT_SAFE_TLD="site"
4039
export APP_FULL_BASE_URL="https://plugins.cakephp.org.ddev.site"
40+
export DEBUG_KIT_SAFE_TLD="site"

config/app.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@
9797
'markstory/asset_compress',
9898
'josegonzalez/cakephp-upload',
9999
'dereuromark/cakephp-queue',
100+
'dereuromark/cakephp-tools',
100101
'lordsimal/cakephp-sentry',
102+
'friendsofcake/cakepdf',
103+
'friendsofcake/crud',
104+
'cakedc/users',
101105
],
102106
],
103107

src/Controller/PackagesController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function index()
3030
}
3131

3232
$featuredPackageNames = array_values(array_filter((array)Configure::read('Packages.featured', [])));
33+
if ($featuredPackageNames !== []) {
34+
shuffle($featuredPackageNames);
35+
}
3336
$featuredPackages = [];
3437

3538
if ($featuredPackageNames !== []) {

templates/element/Packages/package-tile.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @var bool $isFeatured
66
*/
77
$isFeatured = $isFeatured ?? false;
8+
$query = $this->getRequest()->getQueryParams();
89
?>
910
<article class="group flex h-full flex-col overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-sm transition hover:-translate-y-1 hover:shadow-lg">
1011
<a class="block border-b border-slate-200 bg-slate-50 px-5 py-4 transition group-hover:bg-white"
@@ -40,7 +41,15 @@
4041
</p>
4142
<div class="flex flex-wrap gap-2">
4243
<?php foreach ($package->cake_php_tags as $tag): ?>
43-
<a href="?slug=<?= h($tag->slug) ?>"
44+
<?php
45+
$tagQuery = $query;
46+
$tagQuery['cakephp_slugs'] = array_values(array_unique(array_filter([
47+
...((array)($query['cakephp_slugs'] ?? [])),
48+
$tag->slug,
49+
])));
50+
unset($tagQuery['page']);
51+
?>
52+
<a href="<?= h($this->Url->build(['?' => $tagQuery])) ?>"
4453
class="rounded-full bg-cake-red/10 px-3 py-1 text-xs font-medium text-cake-red transition hover:bg-cake-red hover:text-white">
4554
<?= h(str_replace('CakePHP: ', '', $tag->label)) ?>
4655
</a>

0 commit comments

Comments
 (0)