Jump to content

Search the Community

Showing results for tags 'get'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 18 results

  1. With JS fetch() it is a bit tricky to get for example $_POST populated (params need to be FormData / forms), but would it possible to get PW $input (get, post, urlSegments, queryString) working for fetch requests? Is there a fix / hook / workaround to solve it PW side?
  2. Hi all, I've set up a filter on my product-page, which I then use to...filter my products! – I've got pagination set up, and 30 items per page. – When I active the filter it works perfectly (in my opinion). Here's what I'm struggling with though: When I'm on another page (filtered as well/or the total overview) and I put my GET request in for the filter, it gives back the result, but still with the page-number there. In some cases, this is no problem – like a A-Z or Z-A filter, but others (say, per location) I might have less pages. Visual/code ref: (I DO have 3 p
  3. Hi! In busy learning to know PW better I'm looking at existing code. I have Bitpoets Editorial Responsive Blog as example. While looking through the code I've just found this line in the blog-head.php <link rel="stylesheet" href="<?= $config->urls->templates ?>assets/css/main.css?ts=<?= time() ?>" /> I hope it's not a stupid question but I've never seen this before... main.css?ts=<?= time() ?> I notice the main template is empty but of course renders on the front end. Using a timestamp really has me totally confused. Can someone explain it
  4. Hello, I have a search page loosely based on Skyscrapers where I'm parsing a selector with options 'beds', 'bathrooms', 'size' fields. It is working well until I select 'Any' after I've run a search. This is where no results are returned (/?beds=&bathrooms=&size=&submit=). I want it to reset and show all results. I hope this isn't too vague.
  5. Greetings, I've created a product database which all use the template product.php and are published on the website. I'm trying to create an overview table with pagination of all the products, but using $pages->get does not return an object, only the object title. $products = $pages->get("template=product, limit=10"); This returns 10 strings in the frontend but not the object. When looping over the result set to get product fields, i get the following error: Notice: Trying to get property 'title' of non-object Because the product database is fairly
  6. Hi, well, here's something I just don't understand and didn't find an explanation in the reference for. I've got a number of pages: HomeAuthorTomas Tranströmer José Saramago Kenzaburō Ōe ... Nobel prize2012 2011 ... I created a field "author", type Page, which contains all these 3rd level pages (Tomas Tranströmer, José Saramago, Kenzaburō Ōe, ...). In the template used i.e. for /nobel-prize/2011, the "author" field is populated and contains the page ("Tomas Tranströmer"). Now I would like to create an output: $content .= $pages->get($page->author)->title; Confusingly, the
  7. I'm in the process of rebuilding a WordPress site over into ProcessWire (Yay!) I'm using Ajax to call a page (ajaxAgenda) from the homepage which includes a PHP file (partialAgenda) which makes the call. This is what I got in the included partial. Notice that the URL has a / at the end to prevent redirection. var page_number = 1; var get_agenda = function(){ $.ajax({ type : "GET", data : {pnum: page_number}, dataType : "html", url : "/components/ajaxAgenda/", beforeSend : function(){ $('#ajax-loader2').show(); }, success : function(data){
  8. Hi there, I'm trying to implement a hidden stats page to store various counters and I'm using this article as a basis for my PHP Code I've created a stats page based on a stats template, and the page is set to unpublished with no other attributes. What have I overlooked if the following code returns a Nullpage ? $stats = wire(pages)->get("/stats"); I can "get" a homepage without any issue for reference.
  9. Hello there I'll start right away: Let's imagine we have a index page: example.com/recipes This index page is also a faceted search accepting GET params for search query, categories, tags, ingredients, ... It would be amazing to be able caching this index page to a certain degree. For example: The GET param categories is somewhat limited. There are only 5 categories in total so it would not add too much overhead. If I could add this GET param to a whitelist and set the total allowed GET params to 1 for example, this would make a great difference in performance. (If we c
  10. Is there any way to return <?php $sectors = $input->get->project_sectors; ?> as the titles, and not the names? So instead of, for example, it returning landscape-design (the name) it would return Landscape Design (the title). Thanks, R
  11. Hi, I'm probably missing something trivial, but for some reason I can't retrieve GET input values. Consider the following simple piece of code, named whatever.php : <?php echo $input->get->id; echo " -- "; echo $_GET['id']; ?> I make it a template, then a visible page, then I try to access http://example.com/whatever/?id=foobar but it only prints " -- " (i.e. the second echo line). I tried to make "id" a field of the template but it didn't help. What am I doing wrong ? Is it related to rewrite rules ?
  12. Hello, I'm wondering if this aproach is correct, had not been tested yet. What I'm trying to do is Log In an user from one browser and keep the user logged in a different browser. example: I have an app and send a login command to a processwire backend, the backend respons with the user id if the login was successful. http://example.com/login POST (encripted): username password response: 123 The code begin could be $username = $input->post('username'); $password = $input->post('password'); $user = $session->login($username, $password); if($user){ echo $user->id
  13. Pretty new to processwire and really enjoying it so far. I'm trying to build a pretty simple Ajax driven website (pretty new to me so excuse my general ignorance regarding ajax) which inserts content from child pages into a parent page. I've read through Ryan's thread here which was super helpful, but still can't quite figure out the best practices for what I'm trying to achieve. For now, all I'm trying to do is have the parent page load content from a child page with an ajax request, BUT these child pages also need to be inaccessible via the URL processwire creates for them. So the child pa
  14. Hi Guys, I am absolutely loving Processwire but need some assistance in a custom build. I have created a repeater for an internal page. I need to pull the data using GET or some other way to display the first five repeated sets onto my home page for my featured items section. Is this possible? If so, any examples? Guidance? Your help is much appreciated!
  15. Hi there, I've got two templates that need some of the same fields. So, is it possible to get a field value from another template? So when I update on one template, I update on all other fetching this field? Thanks
  16. Hi everybody, I have got a (hopefully) pretty simple question but I can't find a "clean" solution for it and hope you can help me. I'm using a form to let the user specify different variables (Get Request) and show them the according pages. It's more or less similar to the Skyscraper Demo page. Now I'd like to add three links to set the limit of my query. So if the user clicks on e.g. 10 -> only 10 pages should be listed (leaving the other variables the same). I'd like to generate links with the current URL but change the limit variable. Is there a function to get the current URL
  17. Hi, I am sanitizing some variables coming in via GET through Ajax as follows before passing them on to a selector. Is this the correct way of doing it? Secondly, can I instead type cast where I am expecting integers? Thanks. $sort = explode(" ", $sanitizer->selectorValue($input->get->SortX)); $sortOrder = $sort[1] == "DESC" ? "-" : "" ; $sortValue = $sort[0]; $start = $sanitizer->selectorValue($input->get->StartX); $limit = $sanitizer->selectorValue($input->get->SizeX); //Would this suffice as well since I am expecting integers here? //$start = (int) $input
  18. I'm trying to get Paypal express checkout working... After going through the process, paypal redirects me back to my site where I'm supposed to grab the get variable 'token' anyways, I could never see it, and finally tried getting paypal to redirect to a page outside the PW site with the same code. The variables were now there. Come to think of it, I haven't been able to post forms to other pages either. The forms work when they post to themselves, but not when they post to other pages. Is this a security measure so that people cannot post false values to the page? Perhaps there's a settin
  • Create New...