Search the Community
Showing results for tags 'api'.
-
I am about to create several pages via API. In another script I populate the fields per language. I found that each page generated via API, even when alternative languages are also populate, they are inactive by default. Is there an API method to set it to active? Either when creating a page, o...
- 12 replies
-
- 1
-
-
Is there a way to make JPGs progressive by default via the API? I've added the following to my site/config.php file but user-uploaded images are often displayed as non progressive. $config->imageSizerOptions = array( 'upscaling' => true, // upscale if necessary to reach target size? 'crop...
- 12 replies
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
Navigation Function get the root page with wire()
congomonster_616 posted a topic in API & Templates
Hi, after a long time i use processwire again. But i have a problem and can't get a solution. I have build a navigation. I have to reuse this part. So i thought, i could write a function. I have searched the forum and i learned that i have to use wire() to get access to the sites inside the fun...- 2 replies
-
- wire()
- navigation
-
(and 1 more)
Tagged with:
-
Hello, I´m trying to make a REST API with PW. is there something like $wire('input')->get and $wire('input')->post but for the verbs delete and put? also how can I separate the code for each verb. example: I have the following endpoint /users/emails Processwire can detect what verb is...
-
Hey all. I am trying to create an image-field from API. It is working fine, but opening the page with the new image-field leads to the following error: FieldtypeImage: Field "servicetype_image_1129" is not yet ready to use and needs to be configured. For all other fields I am creating in this m...
-
Hi all, Just a little context, I have need of a select/drop down on a form to update automatically. So I believed I had achieved this, by programmatically updating said field via an webhook, code included below. Which looked like it worked, as all the correct options do now infact sho...
- 1 reply
-
- formbuilder
- api
- (and 4 more)
-
Page Query Boss Build complex nested queries containing multiple fields and pages and return an array or JSON. This is useful to fetch data for SPA and PWA. You can use the Module to transform a ProcessWire Page or PageArray – even RepeaterMatrixPageArrays – into an array or JSON. Queries c...
- 24 replies
-
- 29
-
-
-
Hello forum, This is really a weird one, because front end editing works in a earlier website we did to a customer. When I check the source code for current website it does initiate front end edit: <span id=pw-edit-1 class='pw-edit pw-edit-InputfieldPageTitle' data-name=title data-pa...
- 3 replies
-
- front end editing
- api
-
(and 2 more)
Tagged with:
-
Hello forum, this is my first security related post, so I'm a bit of a newbie. I understand that when I have direct front-input from user I should sanitize the input, but how about when I use a secret key for showing a API for a third-party supplier? Should I sanitize the input->get() key?...
- 4 replies
-
- security
- injections
-
(and 2 more)
Tagged with:
-
Hello There, I have saw a post that was covering event-calendar with php, ajax and js. That was showing a monthly overview when I click on a "month" button or when I switch the month. And show the events on one particular date when I pick a day. Also, most events are kind of exhibitions and so they...
-
wireshell 1.0.0 is out See Bea's post -------- Original post ----------- Now this one could be a rather long post about only an experimental niche tool, but maybe a helpful one for some, so stay with me Intention Do you guys kn...
- 176 replies
-
- 33
-
-
I'm trying to create a pagename (for internal use, not for presentation to the users) with multiple dashes in the middle. Here's an excerpt of my code: $p = new Page(); $p->template = 'template-name'; $p->name = "$prod--$variation"; ProcessWire seems to apply $sanitizer->pageName($name, true...
-
Hello forum, we're trying to use Processwire as our REST-API. We are having problems with our API login to Processwire from frontend. It gives us 403 error. We have installed ProcessWire to subdirectory (/api/*) and our frontend is static JS files at root ( / ). Apache access logs gives 404 to...
-
Hi everyone It seems that I don't fully understand the wireTempPath() function and I need some help. I use wireTempPath() to create a new location in assets/cache/WireTempDir and than copy a pdf from the assets/files/page folder to the new folder. I want the file to be accessible only for...
-
Hi, is there a hook after the current (active) page got created? Or which method got called in the Page class after the Constructor of the current page got initialized? Thanks.
-
I am very sorry for asking this but i totally do not understand how to set values of checbox using API. I have checbox field on my page with name "order_status". So i've tried few ways to make it checked but it still doesn't work: $userPage->order_status->value = 1; $userPage->order_st...
-
Hi guys, the field "redirect_last" of type DateTime got not updated. The update on the field "redirect_counter" works and got saved. Does anybody know what I did wrong in my code? if ($input->urlSegment(1) === 'redirect') { $page->of(false); $page->redirect_last = time();...
-
Dear all, I'm upgrading an older side with the new custom fields for images feature as of 3.0.142. My image field is set to "Automatic" and holds a bunch of images together with their respective description on each page. New custom fields include "caption" among others and to make my live easie...
-
As an admin I want to use the API to ask if a page is published - using the $page->isPublished() method - so that I know it's published - as opposed to unpublished or trashed pages. That includes hidden pages. This method will correspond to Settings -> Status when editing pages: (Publ...
- 2 replies
-
- api
- ispublished()
-
(and 1 more)
Tagged with:
-
My clients wants a modal to show up on every page. But when a user clicks inside the modal -> a session-cookie is set and the modal gets a class. // user clicks on modal button $('.modal_button').click(function(){ // 1. set PW session cookie // 2. toggle class $('.modal').toggleClass('off'...
-
Hello, I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array. Code: $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=...
-
Hi! I have been struggling with this for the last few hours and could not find a solution for it anywhere on the forums. I want to create a repeater field using the API and then add fields to it programatically. I can create the field and assign it to a template alright, but I can't assign any fiel...