-
Posts
1,065 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zeka
-
$title="谢师宴 11am-1pm, Test服务奖 service award"; $eventspage = $pages->get(1085); //eventspage $findeventspage=$eventspage->events->find("title='$title'"); Try this
-
@SIERRA Just put your text in quotes d($pages->find('title="谢师宴 11am-1pm, Test服务奖 service award"'));
-
You have several typos in your code. $searchResults = $pages->find("template=product")->explode(function($item, $i) { return [ 'title' => $item . ' - ' . $i ]; }); d(wireEncodeJSON($searchResults));
-
@adrian, @tpr Thanks for updates to the module. The new color scheme looks clean and new style of objects info inside the Dump panel also really great edition.
-
@NorbertH I'm not using UIkit but as I understand from components list, they have "Notification" component which intended to close automatically. Or you can use JS example from @bernhard
-
@helmut2509 Also, do you use URL segments or call $page->render() somewhere?
-
@adrian, @Guy Verville Thanks for your inputs. I tested WireHttp a little today and I must say that it's quite convenient, so I will use it. The beauty of PW, one tool for almost all tasks. $clantag = "test"; $token = "---"; $url = "https://site.com/" . urlencode($clantag); $http = new WireHttp(); $http->setValidateURLOptions([ 'convertEncoded' => false, 'encodeSpace' => true ]); $http->setHeaders([ 'Accept' => "application/json", 'Authorization' => "Bearer " . $token ]); $response = $http->getJSON($url); d($response);
-
Migrating a static html website to ProcessWire
Zeka replied to thetravelwriter's topic in Getting Started
Hi @thetravelwriter I don't think that there any migration tool for static sites, but using an HTML DOM parser and PW API you can easily migrate your data.- 1 reply
-
- 6
-
I'm planning to start a project where remote API will be involved and thinking about tools to work with API. Of course, we have WireHttp class and actually, I think to go with it, but maybe there are more specialized alternatives that worth to consider?
-
@Hajosch Looks like something wrong with CSS. Make sure that you load CSS file from comments module and it actually gets loaded and not conflicting with other styles.
-
Thanks @Robin S
-
Hi. I'm trying to tune my searches, so I'm playing with 'loadOptions' and 'joinFields'. I successfully decrease the amount of PDO queries, buy joining not complex field types. But when I join field types as Images, SelectOptions ( all where multiple values are returned ) and then access them, they contain only the first array value. $products = $pages->find("template=product, (category=$page), (categories=$page), sort=-stock, sort=title, ", ['loadOptions' => [ 'joinFields' => [ 'page_title', 'images', // has multiple values 'labels', // has multiple values 'price', 'unit', 'special_price' ]]]); foreach ($products as $p) { $p->labels <--- contain only first value } Is it normal behavior? If so, can somebody provide some good read about it. Thanks!
-
Little bit OT. As the former user of Seblod (Cck extension for Joomla) I remember that they have quite flexible storage setting for fields. https://www.seblod.com/resources/manuals/advanced/understanding-the-storage Would be super cool to have some kind of module that can provide such functionality.
-
By the way there is template context for fields. By default, there are not many options that you can override, but by setting advanced=true you would be able to override all options. https://processwire.com/blog/posts/pw-3.0.87/#new-field-template-context-settings
-
TextareaLanguage not working in Repeater-field
Zeka replied to Andreas Faust's topic in Multi-Language Support
It worth to mention that there is an option called 'Language Support / Blank Behavior' on'Details' tab in the field config. Maybe it's somehow relative to your case. -
Hi. After update to 3.0.109 from 3.0.106 when I try to access DB backup modules page I get Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) PHP 7.2.4 Laragon Does anybody get the same error?
-
$sanitizer truncating text field - defaults are set where?
Zeka replied to Smoo's topic in Getting Started
https://processwire.com/api/ref/sanitizer/text/ $sanitizer->text($input->post->message, [ 'maxLength' => 0 // no limit ]); But I think that more suitable method in your case is textarea https://processwire.com/api/ref/sanitizer/textarea/ -
@tires I'm not sure that there is something built in for your needs in PW, but you can easily create a custom module As the starting point, you can use these example https://github.com/benbalter/Frequency-Analysis/blob/master/frequency-analysis.php
-
[answered] Cropped images are not in Pageimages. Why?
Zeka replied to szabesz's topic in API & Templates
Max allowed files ? -
[answered] Cropped images are not in Pageimages. Why?
Zeka replied to szabesz's topic in API & Templates
Hi @szabesz I'm also on 3.0.108 and it works for me as expected. After cropping an image I have to images in Pageimages. What type of formatted value do you use for this field? -
Hi. Test this $module_id = wire('modules')->getModuleInfo('ProcessSettingsFactory')['id']; $adminPages = $this->wire('pages')->find("template=admin, process=$module_id");
-
@Macrura https://github.com/outflux3/SettingsFactory/blob/master/SettingsFactory.module#L69 I don't think that looping through all admin pages is the optimal way to find all settings pages. In that way, on every page load, all admin pages get loaded and it produces a lot of unnecessary PDO queries. For example in one of my project, I have a lot of repeater/matrix pages and I get this stats without/with the SettingFactory module: Pages loaded (38 / 239) PDO queries (38 / 224)
-
Hi. From ListerPro description: Which field types this feature supports? What about multilanguage? Can I list values for different languages at the same time and edit them inline? It would be great if somebody could share a video or gif screencast of this feature. Is it possible to separate fields to several rows for every page? (If no, is there hooks that I can use to customize lister output? ) I would greatly appreciate any answers to this questions.
-
Display number of selected items: is there an in-built PW method for this?
Zeka replied to dragan's topic in General Support
You can use a hook for that wire()->addHookAfter("Inputfield(name=categories)::renderReadyHook", function($e) { $inputfield = $e->object; $inputfield->label = $inputfield->label . " (" . count($inputfield->value) . ")"; }); ProcessField::buildEditForm should also work. To get it working without page-reload will require some custom js. You can find some useful parts in this thread P.S @bernhard was faster than me.- 11 replies
-
- 2
-
- inputfields
- selection
-
(and 2 more)
Tagged with: