Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/2025 in all areas

  1. hi, here is the way i do what i think you're describing, easy for me and easy for the client too maybe it could be useful and sort of adaptable for your structure i put all this in a code block, easier to comment 🙂 /* as it is a multilingual website, i need an easy way to display the tags in various languages it would work for a one language wensite and it make easy for the client to add a new category without going anywhere else than in the pages tree - a page with a template blog_cats without file - chhildren of this page with a blog_cat template (no file needed either) - for the blog article pages a page reference field - pages multiple array, every article can belong to several categories on top of the blog page (with url segments allowed) */ // first i retreive the categories in the user language // 1122, i'm sure you guessed, being the blog_cats page $cats = $pages->find('parent=1122, template=blog_cat'); $cats_name = array(); foreach ($cats as $c) { $cats_name[] = $c->name; } // then i check if there is an url segment $zcat = isset($input->urlSegment1) ? $input->urlSegment1 : ''; // if not if ( $zcat == '') { $arts = $pages->find('template=blog_article, sort=-date_date, limit=6'); $total = $pages->count('template=blog_article, sort=-date_date, limit=6'); } // if yes else { // yes, being paranoid i first check the url segment is in the cats array above, else... 404 // well, if it were my website o would go for a die() but clients usually need to be a bit more diplomatic :) if ( ! in_array($zcat, $cats_name) ) throw new Wire404Exception(); $arts = $pages->find('template=blog_article, artcats%='.$zcat.', sort=-date_date, limit=6'); $total = $pages->count('template=blog_article, artcats%='.$zcat.', sort=-date_date, limit=6'); } of course, easy peasy to set a raw of butttons/links to select a category on top of the blog page using the $cats array retreived above (i like when things are easy :D) <div class="top_cat_wrapper"> <a href="<?= $page->url; ?>" class="blog_cat_butt<?php if($zcat == '') echo ' selected'; ?>">*</a> <?php foreach($cats as $bc): ?> <a href="<?= $page->url.$bc->name; ?>" class="blog_cat_butt<?php if($zcat != '' && $zcat == $bc->name) echo ' selected'; ?>"><?= $bc->title; ?></a> <?php endforeach; ?> </div> in case it could be useful have a nice day
    1 point
  2. Hey @ryan. After some time off, I’m back, and I can already notice a lot of improvements to the admin theme. Great work! I wanted to touch on the topic of the tight control you have over the project. I think I didn’t explain it clearly before, so let me try again. First off, I truly believe in your intentions and your commitment to ProcessWire — that’s never been in question. My perspective is just from someone looking at things with fresh eyes. Since this project has been with you for over a decade, it’s totally natural that some aspects might go into autopilot or get a bit of tunnel vision. What I meant by "tight control" is that it feels like most things — or nearly everything — end up depending on you. A few things that stood out to me: You're the only one who can commit. That can give the impression that there's a lack of trust in the community. I get that quality matters, but even the most successful open-source projects had to open up at some point. There are many long-time users and proven professionals here who could help with small fixes and improvements — which would make things move faster and ease the burden on you. The master branch is still the default, even though folks on the forum have already pointed out that switching to the dev branch might help newcomers see the project as more active. The development of the new admin theme, while impressive, also felt like a missed opportunity to leverage community input earlier in the process. What exactly does “community” mean in this project? For many of us — like @bernhard and others — PW isn’t just a hobby, it’s the foundation of a businesses. That’s why transparency and shared involvement matter so much. And just as a practical thought — what would happen if, for some unforeseen reason, you were no longer able to maintain the project? Things like GitHub access, the website, and the forum are all critical. It might be worth thinking about a foundation or even just a small board to help guide the future of PW together. That’s the kind of "tight control" I was referring to, and I hope this version makes more sense. Again, I really do appreciate everything you’ve built — and I say all this in the spirit of constructive feedback and shared care for the future of the project. All the best!
    1 point
×
×
  • Create New...