ngrmm
Members-
Posts
442 -
Joined
-
Last visited
-
Days Won
3
ngrmm's Achievements
-
Best way to deal with multilingual images that are optional
ngrmm replied to joe_g's topic in Multi-Language Support
You could use a hook to create those new fields and add them to certain templates. -
@robert it seems that this module does not work with the latest PW version Schwerwiegender Fehler: Uncaught TypeError: Cannot access offset of type string on string in site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php:189 #0 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(59): ProcessTranslatePage->setLanguages() #1 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(41): ProcessTranslatePage->initSettings() #2 wire/core/ModulesLoader.php (168): ProcessTranslatePage->init() #3 wire/core/ModulesLoader.php (100): ModulesLoader->initModule() #4 wire/core/ModulesLoader.php (111): ModulesLoader->triggerInit() #5 wire/core/Modules.php (338): ModulesLoader->triggerInit() #6 wire/core/ProcessWire.php (775): Modules->triggerInit() #7 wire/core/Wire.php (413): ProcessWire->___init() #8 wire/core/WireHooks.php (968): Wire->_callMethod() #9 wire/core/Wire.php (484): WireHooks->runHooks() #10 wire/core/ProcessWire.php (909): Wire->__call() #11 wire/core/ProcessWire.php (665): ProcessWire->__call() #12 wire/core/ProcessWire.php (613): ProcessWire->setStatus() #13 wire/core/ProcessWire.php (315): ProcessWire->load() #14 index.php (52): ProcessWire->__construct() #15 {main} thrown (Zeile 189 in site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php) Diese Fehlermeldung wurde angezeigt wegen: Sie sind als Superuser angemeldet. Fehler wurde protokolliert.
-
Install MarkupGoogleRecaptcha on FormBuilder form
ngrmm replied to couturef's topic in General Support
@couturef i doubt that the module is up to date please check the support thread of the module here: -
Trying to link to a specific place on another page
ngrmm replied to Charlie W's topic in General Support
@Charlie W your question ist not directly related to processwire. You would get or find an answer more quickly on stackoverflow. Or just ask chatgpt, claude, … acme/#sliding is correct. Just make sure that you do not have multiple elements with the same id. Then you link <a href='#siding>siding</a> should get you to your target <div id='siding'></div> -
New post: Using date range fields in ProcessWire
ngrmm replied to ryan's topic in News & Announcements
@ryan is it also possible to disable a date range via setting like: $wire->addHookBefore('InputfieldDateRange::getSettings', function($e) { $f = $e->object; if($f->name != 'booking_date') return; // // set Christmas until New Years Day to be disabled // $f->disabledDates = [ '2024-12-25 - 2025-01-01' ]; }); UPDATE: right now I'm doing this // // helper function // function getDatesBetween($startDate, $endDate) { $dates = []; $currentDate = strtotime($startDate); $endDate = strtotime($endDate); while ($currentDate <= $endDate) { $dates[] = date("Y-m-d", $currentDate); $currentDate = strtotime("+1 day", $currentDate); } return $dates; } $wire->addHookBefore('InputfieldDateRange::getSettings', function($e) { $f = $e->object; if($f->name != 'booking_date') return; $disabledDates = getDatesBetween("2024-12-25", "2025-01-01"); // // set Christmas until New Years Day to be disabled // $f->disabledDates = $disabledDates; }); -
access a related page templatefield's label in the current user language
ngrmm replied to froot's topic in API & Templates
@froot so related_tutor or related_movie, is a page field right? Is it a single or multiple page field? If multiple (by default), then you would need to select one from the array. like: …related_tutor->first->template->fields->skills->label and check this https://processwire.com/api/ref/field/get-label/ -
[SOLVED] How to hook into page ADD NEW and change sort order?
ngrmm replied to Klenkes's topic in General Support
I've no idea how to tweak that. But you could also create a custom backend page, see here. -
@rushy go here. There are many ways. Maybe one fits you
-
@leode you also edited your config.php right?
-
Resaving a page from the same variable and duplicate items in repeaters
ngrmm replied to DrQuincy's topic in API & Templates
@DrQuincy Matrix repeaters are pages themselves. They are different than usual fields. First you create a matrix type and add content. Then save the matrix page and then you can save your actual page. Each time you add a matrix type a new page is created. You can find these pages in the page tree under admin- 1 reply
-
- 1
-
Did you try str_replace?
-
@Purple your question is more related to php as to processwire. You better search in stackoverflow for these kind of question. Anyway, you could use a for loop. This code gives you the first images of the first five category children. for ($i = 0; $i <= 4; $i++) { foreach($categories as $category) { $image = $category->children->eq($i)->images->first; } }
-
I've one page in production which has similar bizarre issue. I'm not able to view an unpublished page as a superuser. But this happens only in chrome. No problem safari or firefox. I gave up to find out why ? Which browser are you using? Please let me know if you have solved this issue Found this here but I'm a noob in host server settings
-
How to add spaces left and right for vertical images
ngrmm replied to maximus's topic in General Support
@maximus actually there is already ratio inside the pageimage class see here: https://processwire.com/api/ref/pageimage/ And you could also solve this without generating new images. You could set a square container and put the orginal img inside it. Then use CSS to get what you want. -
This is strange. Are those category pages actual pages in the frontend? Or are they just helper page to store data and they do not exist as pages in the frontend? You could reset the module cache to make sure, it's not cache related. Do those pages/templates have any special settings? Any non defaults? content-type? url segments?