Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adrianbj/processcodetester

A ProcessWire admin module to quickly test code without needing to edit templates
https://github.com/adrianbj/processcodetester

code processwire tester

Last synced: 4 days ago
JSON representation

A ProcessWire admin module to quickly test code without needing to edit templates

Awesome Lists containing this project

README

        

ProcessCodeTester
=================

#### This module is obsolete - please use the [Console panel from the Tracy Debugger module](https://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel)

A ProcessWire admin module to quickly test code without needing to edit templates

Ok, this is really not very fancy, but I think it will come in quite handy - for me at least :)

It provides an admin page where you can test code without the need to edit template files.

It runs from a new page under Setup called "Code Tester"

You are presented with a simple text area. Enter your code, including an opening find(selector) as $page) $out .= "

  • $page->name
  • ";
    ```
    ```
    $getpage = $pages->get(selector); //This will populate the results frame with the page returned by the selector. You must use $getpage as the variable!
    ```
    ```
    foreach($pages->find(selector) as $p) $p->delete(); // Bulk delete pages matching the selector
    ```
    So really it is more than a code tester - it can also be used as a way to test selectors and return the resulting page and also as a way of running admin maintenance scripts.

    ### Forum
    http://processwire.com/talk/topic/4689-code-tester-module/

    ## License

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

    (See included LICENSE file for full license text.)