Jump to content

Search the Community

Showing results for tags 'wire'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 8 results

  1. I am wondering, how do you pass a variable into wire('page')->get() inside a function? I have been looking through the forums, but unfortunately I have not found the answer yet. My current set up is: function generateNewPages($parentPageName) { $p = new Page(); $p->template = "parent"; $p->parent = wire('pages')->get('/home/'); $p->name = $parentPageName; $p->title = $parentPageName; $p->of(false); $p->save(); $p2 = new Page(); $p2->template = "child"; $p2->parent = wire('pages')->get('$parentPageName'); $p2->name = "child"; $p2->title = "Child Page"; $p2->of(false); $p2->save(); } When I try to run it by passing in a title like generateNewPages('Demo');, "Demo" is created, but when it gets to the child page I get: Unknown Selector operator: '$' -- was your selector value properly escaped? Is there a way to pass the $parentPageName to "wire('pages')->get('$parentPageName')" ?
  2. Hi All, Arabic content changes not available in page getChanges method While editing the page from admin panel in the multi-language field, added a hook to save the changes made to the page. $this->pages->addHookAfter('saveReady', $this, 'hookUpdateLog'); public function hookUpdateLog(HookEvent $event) { $page = $event->arguments[0]; if(in_array($page->template->name, $this->templateList)) { $this->logFieldChanges($page); } } public function logFieldChanges($page) { $changes = $page->getChanges(); //This changes does not contain the field of arabic changes. } Please let me know, If I am approaching in a right way.
  3. Hi guys, I would very much appreciate to get your feedback to the following idea: We've created a publishing system for our company that is based on ProcessWire. Currently we are only using it for one publishing page. But it could very well be possible that in the future we are in need of managing additional pages. I'm thinking of something like it is described in the article about Multiple-site support, but with something like a site-core that is included by any site instance. To keep server management simple all the instances could use the same database. Imagine the following folder structure: All the templates, modules and assets from the "site-core" folder are automatically loaded by each other "site-" instance. This would enable other instances to add their own templates but still let them use the "site-core" templates. Also the ProcessWire "wire" folder would remain untouched. Additionally it could be great to restrict module configuration access to only activate the "Site" tab on instances. And being able to create new instances from the "site-core" instance ;-) What do you think? Thanks for your feedback Nik
  4. I've just updated a site from version 2.7.1 to 2.7.2. This worked fine locally, but when I repeated the process on the staging site, I get a list of errors when I log in to the admin control panel. They're all begin with: Modules: Configurable module check failed for FieldtypePage, retrying... I've attached a screenshot of the full list. The site/assets/logs/modules.txt file shows similar warnings. But the site seems to work fine otherwise. Does anyone know what might be going on here and how it could be resolved? Many thanks!
  5. I was wondering what the best (fastest/lesses computing power) aproach in using PW API variables inside the $cache function call? (not actual code) Example 1 echo $cache->get("example-1", function($user,$page,$pages) {} Example 2 echo $cache->get("example-2", function() use($user,$page,$pages) {} Example 3 echo $cache->get("example-3", function() { $user = wire('user'); $page = wire('page'); $pages = wire('pages'); }
  6. 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 From what I've read probably, I should be using $wire('pages')->get. But this gives following error: Error: Function name must be a string Removing $ from wire solves above error but it doesn't print anything. Any help would be very much appreciated. Thanks a lot.
  7. I successfully made my boostrap 3 site? not the site profile processwireboostrap3. Is there someone who made any guide or walkthrough tutorial on how to port it on PW? not necessary a guide that's using bootstrap 3, even plain html css template will do. Just want to gain idea on how to port your own static website to PW.
  8. Hello, since my post about RESTful Processwire https://processwire.com/talk/topic/7159-rest-helper-for-processwire/ was quite popular (thanks for showing it in the newsletter by the way ) I'm planning to include some of the helper code inside the PW core and then make a pull request in the hopes that merges with the current dev branch. So far I have identified 3 files that I should modify /wire/core/WireInput.php So I can add a "params" method in order you can have any params for any request method get post, put delete etc. /wire/core/WireHttp.php So I can add method to send put delete patch requests, etc. and get JSON output /wire/config.php So I can add more fieldContentTypes and Header types for the response. In the same file however, you got this /** * ajax: This is automatically set to TRUE when the request is an AJAX request. * */ $config->ajax = false; Where I can find the code to set this? So I can add $config->post = false; $config->get = false; $config->put = false; $config->delete = false; And set them when a page is requested when a verb is used to call an endpoint. Thanks!
×
×
  • Create New...