Jump to content

Search the Community

Showing results for tags 'function'.

  • Search By Tags

    • function ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Found 12 results

  1. I'd like to set up a LazyCron function that fires every hour on each page that has a template named "post". So far I have gotten the function running. But when it has fired once on "Page with Title A", it takes and hour before it is fired again on any other pages. It makes sense, hooking the functio...
  2. I was really unsure of how to actually title this post, so I do apologize (if someone has a better idea, I will gladly edit it). I am using the profields: pagetable field to allow people to create their own "content" (copy, image, button, etc etc) and rearrange it. I also included a field called "co...
  3. So I have a form, once completed, will create new pages. All in all, this is eazy-peezy for me now. I guess I need a bit of guidance on how to actually structure the rest of my code. I thought I could just write a function (_func.php) and pass the fields to the function and let it do its' thing. Ho...
  4. Hi, I can not run following function code. Help please. Thank you function konular($template,$catPageId,$ColCount,$ColSize,$ImgX,$ImgY) { $x = 0; $category = wire('pages')->get($catPageId); echo '<h2><a href="'.$category->url.'">'.$category->title.'</a></h2>'; $selector= 'template=...
  5. hello to all processwire dudes... I need your help again As you can see in my code i want to call a simple function i the processwire lazy cron hook. Lazy cron works and execute the "echo 30 seconds have passed!" But the function syncMobileDE(); does not return any results. Thanks for your advises...
  6. I just started trying to clean up an old site, and possible utilize some things I have learned over the past year (especially since my knowledge of php has gotten much better). I was trying to utilize a function to switch out the included header based on the url, but I can't seem to get it right. I...
  7. Hey all, For my website I had to make a connection with an external DB. In that DB there are categories of products in different languages, and I want to import these categories in the languages that are available in processwire, I can do that with a very long code but I want to make it shorter...
  8. Hi guys, I'm trying to create a function to show the first picture of a page based on the rendernav function in _init.php. I'm succeding at showing all the images, but i can't find a way to show just the first image. Thanks in advance for anyhelp & merry christmass !!! function renderNavIma...
  9. Hello all, So me being a noob can't figure out how can I use $pages->get or find in my custom function. function printTitle($page_id){ echo "Title of the page is ".$pages->get("id={$page_id}"); } Above code is giving me error : Error: Call to a member function get() on a non-object Fr...
  10. Dear ProcessWire-Community, first of all I want to apologize for my weak english. I'm german and will try my best, but I hope you can forgive me if I missspell something or can't explain it in the right way. Further I want to point out, that in the last few weeks I've become a big fan of the Pro...
  11. Hi there, I am struggling with a very simple variable. I'm using the following function to get the url of a certain child: <?php echo $page->find("projects")->url ?> But it returns an error: Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /...
  12. In the API section of PW website I found a comment made by Apeisa. He wrote: // If the page is editable, then output a link that takes us straight to the page edit screen: if($page->editable()) { echo "Edit"; } I'd like to use this function but the code shown above won't print a link - just a s...
×
×
  • Create New...