-
Posts
1,479 -
Joined
-
Last visited
-
Days Won
21
Everything posted by elabx
-
The fields are created from the template tags! It's been a long time so I don't remember the complete process for a complex field (e.g. repeater type), but I do remember that setting up a text field is done this way. You write the tag in your code and it shows up in the backend. Not really my goal here! haha. But just today I was thinking how I could leverage on tools like Webflow (which I like a lot) but allow for better maintainability if you update your design. Anyway, just ideas ? Maybe this belongs to Dev Talk now that I think about it?
-
WOW did you seriously just build this?! Thanks a lot!! Very educational code. I'll just rip this from the Perch documentation: <perch:repeater id="images" label="Images" max="5"> <perch:before><ul></perch:before> <li> <img src="<perch:content type="image" id="image" label="Image">" alt="<perch:content type="text" id="alt" label="Description">"> </li> <perch:after></ul></perch:after> </perch:repeater> I THINK I could also see how something like this could be implemented too. Anyway, thanks a BUNCH, I might work on your proof of concept a bit further down the road.
-
According to here: https://www.php.net/manual/en/function.curl-setopt.php It does look like it's the same, those two dots at the end seem to indicate the password is coming, though stripe doesn't seem to need it.
-
Hi everyone! Does anyone know if there is a way to render field values in this way: <div data-field="home_text"></div> And then if field exists it just fills in? I'm thinking of the case of using a tool for designing markup like Webflow. A little bit like how Perch CMS handles their content tags: <perch:content id="heading" type="text" label="Heading" /> I feel a lot of this is also in the markup regions area ?
-
Hi! Doesn't seem to be ready, I see it commented here : https://github.com/processwire/processwire/blob/master/wire/core/WireHttp.php#L545
-
I don't know how to do this in PW, but I'm guessing something like GROUP BY in mysql should work. Check RockFinder I see some examples: https://github.com/BernhardBaumrock/RockFinder#custom-sql-aggregations-groupings-distincts
-
Hi everyone! Reviving this. I have a PageArray with pages with two different templates, both with different date properties/fields which need to be used for sorting. Anyone got a suggestion for this? EDIT: Found this solution from @LostKobrakai which might work. I'd wonder if I could simply do the sorting right in the db like @LostKobrakai suggests.
-
PW form integartion with Mautic or using Zapier ?
elabx replied to Rajesh Khanna's topic in API & Templates
No ready-to-go module that I can find. I don't know the details but they seem to support basic authentication to the service just fine. So probably just install their library through composer (or manually) and do the API call on the POST request of your frontend form. https://developer.mautic.org/?php#basic-authentication https://github.com/mautic/api-library- 4 replies
-
- 3
-
-
-
- zapier
- integration of applications
-
(and 1 more)
Tagged with:
-
@adrian thanks for your input! I guess I'll just give up (for now) ? Hadn't thought of a particular advantage rather than I just like to avoid string concatenation just for a personal preference. Pretty much like @adrian says, it looks cleaner imho.
-
PW form integartion with Mautic or using Zapier ?
elabx replied to Rajesh Khanna's topic in API & Templates
I guess if Zapier is an option send a copy of the POST request to a Zapier endpoint (with FormBuilder even easier) and then plug in a Mautic step that adds it as a contact.- 4 replies
-
- 1
-
-
- zapier
- integration of applications
-
(and 1 more)
Tagged with:
-
Thanks for your help @Zeka! Did find this topic while searching for a hint. I am familiar with OR groups, but what I am trying to do here is "migrate" from using string selectors to array selectors, but I can't just get them to behave like its string equivalent! I understand it will be hard to debug this without the whole scope of the ProcessWire project but maybe some has been through the some of the same issues.
-
I have this selector: $operacionesSelector = []; $operacionesSelector['template'] = ['transaccion', 'pago']; $operacionesSelector[] = [ 'pago_entity' => $user ]; $operacionesSelector[] = [ 'transaccion_representante_cliente' => $user ]; $operacionesSelector['sort'] = "-created"; $operacionesSelector['status<'] = Page::statusTrash; If I dump the PageArray object with tracy debugger I get this selector within it's properties: template=transaccion|pago, or1=(pago_entity=8828,title!=""), or2=(transaccion_representante_cliente=8828), sort=-created, status<8192 The problem is, I'm not getting the same results as this selector/find: $pages->find("template=transaccion|pago,(pago_entity=$user), (transaccion_representante_cliente=$user), sort=-created, status<" . Page::statusTrash); That translates within the tracy dump as: template=transaccion|pago, =(pago_entity=8828), =(transaccion_representante_cliente=8828), sort=-created, status<8192 And this "normal" selector does return the expected pages. I don't see why my first selector does not find the pages it should, if I understand correctly the OR selectors, both of this selectors work the same and should find the same pages. Maybe I'm missing something about access control?? Though the template meant to be found shouldn't suppose any issue with the user roles/permissions.
-
Importing JSON to pages - updating existing page/deleting
elabx replied to nsc's topic in API & Templates
You can assign the fields again and save again just like you are doing right now, there's also just field saving like this: $page->some_field = "new value"; $page->save('some_field'); In this scenario I think either is just fine, just useful to know when you get into hooks and stuff like that ? -
Using a PageField and supply specific data to the PageField's context
elabx replied to a-ok's topic in General Support
I don't understand if the total code is random as in, generated on runtime (like and shop's order id?) or if it can exist as another page and be referenced. -
Importing JSON to pages - updating existing page/deleting
elabx replied to nsc's topic in API & Templates
If i'm not missing any detail, you can just call this in you if clause: https://processwire.com/api/ref/page/delete/ if($exists->id) { echo $exists->delete(); } else { ... } -
How to access to a specific repeater item based on a field value?!!
elabx replied to WireCodex's topic in API & Templates
Repeaters are output as PageArray (or rather a class that inherits from it, called RepeaterPageArray), so you have all the methods from a WireArray such as: https://processwire.com/api/ref/wire-array/get/ https://processwire.com/api/ref/wire-array/find/ $page->repeater_field->get('FieldA=2')->FieldC -
New blog post: WEBP strategies, Google Client API, FormBuilder and more
elabx replied to ryan's topic in News & Announcements
Just awesome feature! I'm testing the output strategy with the hook, but I can't seem to make it work if the url() method is preceded by size(). Anyone bumped into this? Ended up using method without the hook, leaving the jpg extension. Works just fine ? -
I got curious and debugged into this because I ran into a similar issue with prev() method while rendering a repeater matrix field, and had to include the 'check_access=0' selector to actually find a prev() page while a guest user visited the page, though I'm not being able to to this with index() too, like: $page->index('check_access=0'); Maybe you can try it and see if it works for you?
-
Awesome! Thanks a lot for your help! Actually found this myself yesterday working through the PW source code (I really LOVE being able to do this).
-
Wow thanks! With the module, is it possible to render the fields with their renderValue() ? Like the access permission does! It let's you view the inputfield, but doesn't display as an actual input but just the value. Thanks for your help! Will definitely take a look at your module.
-
Hi everyone! Does anyone know if I can tweak field access on runtime to hide fields in ProcessPageEdit depending on some other field conditions. Eg. I want users to be able to edit the data if they are asigned to said page, or they created it and if not, hide the fields. Right now I'm wiping the fields with a hook on ProcessPageEdit::buildFormContent, but for example, I'd like to leave the title field intact and some other "common" fields amongst the users.
-
custom php code to find selectable pages + autocomplete
elabx replied to bernhard's topic in General Support
Does anyone know if custom php code this still doesn't work with single page selection with autocomplete? From comments around here and last comment by Adrian on this github issue it would seem to be able to work but I just can't get my hook to do anything to the page selection. -
Ok, then again if I understand correctly you want to set permissions on a page using a Page Referece field (to select a role), being "y" the page being edited? Probably last think I don't understand is if you want to block the edit page or the frontend page (rendered with the template) If the case is blocking the edit page for a certain role, you could hook into the Page::editable() (haven't tested this code): wire()->addHookAfter('Page::editable', function($event) { if(!$event->return) return; // already determined user has no access if(wire('user')->isSuperuser()) return; // superuser always allowed $page = $event->object; if($page->template == "y_page_template") if($page->relatie->has($this->user->roles)){ $event->return = true; } else{ $event->return = false; } } }); Here I am assuming Relatie field actually selects roles in ProcessWire, since those are pages too.