Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/30/2024 in all areas

  1. The RockFrontend site profile for ProcessWire offers a unique combination of benefits by integrating UIKit and TailwindCSS, making it an appealing choice for developers looking for both robust UI components and extensive customization capabilities. Here are some key advantages: Rich UI Components from UIKit UIKit is known for its comprehensive collection of high-quality, ready-to-use UI components. This integration in the RockFrontend site profile allows developers to quickly implement complex components like modals, accordions, and sliders that are visually appealing and functionally robust. Flexibility and Customization with TailwindCSS TailwindCSS is a utility-first CSS framework that provides high granularity in styling elements. It allows developers to build custom designs without stepping out of the framework’s constraints. This can significantly speed up the development process, as it eliminates the need to write custom CSS from scratch. Setup Setup is as simple as these 3 steps: Download the profile Install ProcessWire and choose this profile Follow the instructions on the welcome screen Github: https://github.com/baumrock/site-rockfrontend Modules Directory: https://processwire.com/modules/site-rock-frontend/
    1 point
  2. Yes, this is what I would go for. Sth like domain.com/fr/market1/, domain.com/fr/market2/ etc. so you have segments /language/market/ You can either 1. reflect this in your page tree -home --market1 ---page --market2 ---page 2. use URL segments. This would make the routing more complex. 3. You could also use URL hooks with named arguments and do your routing from there. For 2 and 3 you need to make sure that the URLs with market segments resolve to a 404 without segments/hooks in place. I've done something like this at https://www.ziehm.com/en/products/ and https://www.ziehm.com/en/us/product-portfolio/ where /us/ is the market segment. In this case we solved it through the page tree structure. Drawback is that similar pages under default market (no market segment) and us market need to be maintained seperately. EDIT: to avoid maintaining duplicate pages for different markets, you can have a markets parent with markets as children with templates markets and market respectively: Market pages: -markets --europe --asia --africa Then have a page reference field that allows selection of 1 or more markets. Now you use this field in combination with prices or other things. In the rendering logic you can get the price for market by URL segment. You'd need to have the market chooser direct to the respective market segments of the page. In said project we have a market selector page for each market with the languages to choose from https://www.ziehm.com/en/us/market-selector/ If you have those market pages in the tree, you can also link markets to available languages for that market. It was fun and challenging to work that out for said project.
    1 point
  3. This week we have another update to the ProFields table field. A couple of weeks ago I wrote a blog post about Table v28 and the new actions features that it added. I've been working with Table a lot for my current client project, and have found these new features very useful. But I'm doing a lot of data entry in Table and found I still wanted more. Specifically, I wanted to be able to apply some of the actions directly on the row I was working in (rather than having to select it and then scroll down to the actions). Kind of like how one can click the Trash icon on any row to delete the row... I wanted to be able to apply other actions in the same way (Add, Clone, Copy, Paste). And Table v29 (released today) does exactly that. Another desire I had is for the for row-level actions to be just really simple, with not too much to look at... something folks could use rapidly without having a lot to read. This leaves several powerful and verbose features for the actions menu you saw earlier (the one that appears under the Table). Below is a video that outlines these new row-level actions. It's actually the same video from before, but I added to it for the version 29 features. So I'll try to post a link that starts at the timecode of the new stuff. But if you haven't seen this video before, you may want to rewind to the beginning. Below is the full CHANGELOG for this version: Expanded actions support so you can also execute actions directly on individual rows, which is often more convenient than selecting rows and then applying actions. Hold down the SHIFT key before clicking the row actions select and it will convert any actions that usually append rows to instead prepend rows. This works with the the Add, Clone and Paste actions when clicked at the individual row-level. It also works with the Select action for selecting multiple rows at once. The Select action is there in part for people that may not realize you can already click the sort arrows to select the row. Removed the Vex dialogs when copying or pasting and replaced them with other visual cues to indicate successful copy and/or paste. Added a new config option for disabling the DELETE (trash) icon on individual rows when individual row actions are enabled. This is because the row actions already include a delete action, so the trash icon can be redundant for some who might prefer the additional space. For all non-page selection column types, a new "Settings" option was added (named “formattedValueType”) to indicate how the value should be represented when accessed from a formatted page. Previously the API value was always the selection value. Now you can specify that it should include both the value and label (in your choice of array), or just the label rather than the value. Table v29 beta is available for download now in the ProFields download thread. More core updates are likely for next week. Thanks for reading and have a great weekend!
    1 point
  4. Similar to my suggestion to your earlier question, I think you should give your roles the necessary permissions to edit/create/add children for all the templates they will be working with. If you don't do this you're going to be fighting against what PW thinks that users with those roles are allowed to do and it will be more difficult to achieve what you want. Once those roles have the generic permissions to do what they need to do then focus on selectively taking away those permissions in your custom hooks according to your test on $user, $page, $parent, etc. Also, I've never understood the advantage to not explicitly setting access to every template. "Inheriting" access just seems like a recipe for confusion and accidental oversight. It only takes a short while to set the template access you want roles to have, and even less time if you use the Template Access module. Below is some code with demo logic for determining the allowed templates. You would replace that with your own logic which I expect would use some combination of $parent and $user. $wire->addHookAfter('ProcessPageAdd::getAllowedTemplates', function(HookEvent $event) { $allowed = $event->return; $parent_id = (int) $event->wire()->input->get('parent_id'); if(!$parent_id) return; $parent = $event->wire()->pages->get($parent_id); // Your custom logic here to remove any disallowed templates if($parent->template == 'basic_page' && $event->wire()->user->name === 'test-editor') { $allowed_template_ids = [29, 78]; foreach($allowed as $template_id => $template) { if(!in_array($template_id, $allowed_template_ids)) { unset($allowed[$template_id]); } } $event->return = $allowed; } });
    1 point
  5. I would try InputfieldWrapper::render since the repeater items are wrappers themselves ? but not sure super.
    1 point
  6. @fruid I looked for a solution on the forum. I couldn't find it. I had to write an answer for future generations.
    1 point
  7. Make a static page 404.html Fix the line in the .htaccess file From ErrorDocument 404 /index.php to ErrorDocument 404 /404.html Also, it would be useful to read the article "Optimizing 404 requests in Processwire"
    1 point
  8. Well, poor feedback for now, sorry… My site is still not working. And I'm completely stuck. I have contacted the host admin to see if he has an idea (weird thing : my site folder has 770 permissions and I can't change it via FileZilla although it belongs to my user/group and I have put it there myself (twice ! and I can't delete the old folder site_), the same for assets_ !) Anyway, I constantly have 'server error' too many SQL connections. I've tried avoiding my LazyCron jobs in my _init file. Not better. I've noticed that if I delete all cache/cookies, I can get to the login age for the backend. When I log in, twi cookies get installed : wires and wires_challenge. I go to the backend (as a teacher) but Pages Tree never loads and then I get the Server Error whenever I go to antoher page. If I manually delete the 2 before-mentionned cookies, I can do the process again. If I log in as Admin, the Pages tree loads fine and all backend works fine. I have no idea why such a different behavior… As admin though, I was able to unsinstall some modules as stated in my previous posts, but if I try uninstalled Process Login History, I get the « Server error » (after about 60 seconds) and this module stays there… (that's how I have notices my permissions issues I've talked in the beginning of this message). Sorry for this « messy » message again, but I'm losing myself (and my site) on these issues… I have no idea if it's a server problem or a problem on my side (or both) and it's killing me… I try to be patient and wait for an admin to answer my questions about those file permissions issues. Meanwhile, I keep trying some stuff, reading around the forum trying to find clues… And I give little news here in case someone has a clever idea or stays interested in how this situation will end up ? Thanks anyway for taking the time to try and unserstand my worries. Edit : After wandering in the backend as admin, I click 'View site' and get the "server error"… Insisting a little, it eventually works and comes back on another page… driving me crazy ! Edit 02 : In fact, the error is « Proxy error » and has a 502 mention in my debugging tool (which I don't really know how to use, sorry…)
    0 points
×
×
  • Create New...