Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Pixrael last won the day on April 29 2020

Pixrael had the most liked content!

Community Reputation

334 Excellent

About Pixrael

  • Rank
    Sr. Member

Profile Information

  • Gender
  • Location
    Florida, USA

Recent Profile Visitors

2,100 profile views
  1. I agree.. today everything is SaaS like.. membership+subscription is the thing
  2. You're right, but I think it depends on the project. In my case, it's an internal company system, and only the admin accesses the user's url in the backend. I also take into account a future situation, when the user needs to enter his profile on the front-end, in that situation he is the only one who has access to the url that shows the name of the page. For me it works perfectly. The developer just needs to think ahead and decide. Any page name you want to use in PW should be sanitize first as a rule.
  3. In my current project, I have the user's email field as required, and realizing that the email is unique to each user, I use base64_encode () successfully, having john.doe@email.com the page name of that user is unique like am9obi5kb2VAZW1haWwuY29t, in addition, this keeps a record of the initial email used when registration was made. Initially I had thought of using the email with $sanitizer->pageName() but I did not want to expose the email address so obvious in the url.
  4. This happened to me once and the problem was a non writable folder, check this comment:
  5. Hi, I am trying to organize a new project (admin UI style) and the urls structure should be as follows: /products/ Products list /products/discontinued Products list filtered /products/draft Products list filtered /products/new New product form /products/edit/P0123456789 Edit product form /products/inventory Inventory page /products/P0123456789 Product detail view I am analyzing that if I implement the page relationships in the regular Processwire way for routing, I will end up having something unwanted like this: home - products -- new -- P0123456789 -- edit -- P0123456788 -- P0123456787 -- inventory -- P0123456786 I was thinking in a page structure that contains "static" pages in a "visual" tree and keep constantly growing pages/data in a separate Tree node, then use urlSegments to load/display them, it will be something like this: home - products -- new -- edit -- inventory - data -- products -- P0123456789 -- P0123456788 -- P0123456787 -- shipments -- S0123456789 -- S0123456788 -- S0123456787 -- orders -- D0123456789 Having activated URLSegments in the Products list template I can do the following: /products/ ("list-products.php" all products) /products/discontinued ("list-products.php" filter products with urlSegment) /products/draft ("list-products.php" filter products with urlSegment) But for the Product details view case, I have Four possible scenarios here: 1st. The product node (in the "data" nodes) will have the template file "detail-product.php" assigned to it. The "list-products.php" will use urlSegment to render the requested product page instead of rendering its own "list-products.php" markup. ex: /products/0123456789 2nd. A "item" node with template file "detail-product.php" assigned, will use urlSegments to load product info from "data" product nodes. In this case product nodes do not have template file associated, they only store information. If the url "/products/items/" is requested without segment, it will redirect to parent "/products/". ex: /products/item/0123456789 The "static" page structure will ending like this: home - products -- new -- edit -- item -- inventory 3rd. Following the 2nd scenario, have the product pages directly in the "item" node (the natural processwire structure, no urlSegment implemented). ex: /products/item/0123456789 The page structure will ending like this: home - products -- new -- edit -- item -- P0123456789 -- P0123456788 -- P0123456787 -- inventory 4th. Is the inverse solution to 1st. scenario. Have the product pages directly in the products list node (the PW way), and use the urlSegments in Product list page for the other operations. For ex. New, Edit, Inventory, etc. will be rendered instead the Product list page. The markup of this pages should be placed in other hidden nodes or can be placed only in the file system. The page structure will ending like this: home - products -- P0123456789 -- P0123456788 -- P0123456787 What do you think? Which option is better: the first or the second? Do you think there is another way to organize this? PS: I know that it's a bit heavy to be asking about this again, but is an important decision for a complex project.. and maybe the answers here will serve in the future for someone else in the same situation. Thanks
  6. @szabesz your Tampermonkey script should looks like this: // ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://domain.test/pw/module/edit?name=TracyDebugger // @icon https://www.google.com/s2/favicons?domain=domain.test // @require https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js // @grant none // ==/UserScript== (function() { 'use strict'; $("#ModuleEditForm").prepend('<input type="search" id="jetsSearch">'); var jets = new Jets({ searchTag: '#jetsSearch', contentTag: '.Inputfields' }); })(); the @match parameter is the URL where the script will run each time your browser visit it.. then you will see a small form input before the Module Information Fieldset
  7. Yes, you should use the pin icon to keep the extension visible
  8. It should work because it adds a custom data-jets tag to elements with all the text inside them, regardless of whether it is visible or not
  9. Hi @adrian, Is it possible to use this javascript library on your module? https://jets.js.org/ I use it in my apps UI and it works wonderfully. This script filters in realtime all the elements of the page and shows only those related to the search query. @adrian If you want to do a quick test, you can install Tampermonkey extension in your browser and create a new script while you are on the Tracy Module config page. In that new script add the following lines: // @require https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js then put the following code on the script part: (function() { 'use strict'; $("#ModuleEditForm").prepend('<input type="search" id="jetsSearch">'); // this line is only for testing var jets = new Jets({ searchTag: '#jetsSearch', contentTag: '.Inputfields' }); })(); Then save the script and reload the Module page, enter the parameter you want to access in the new input that appear on top of the page, ex: snippets, or scream, or suffix.. or any parameter you want to find PS: I use jquery to add the input field to the admin UI only for testing purposes, this search input element should be added by the module itself to the page rendering Please let me know if works on your end, here is working ok
  10. I always use: <pw-region id="content">...<pw-region> ..works like a charm
  11. It depends on the specific case, some examples $tpl = file_get_contents($config->paths->templates . 'html/my-file.html'); //ex: <p>This is a test: {foo}, and this is another test: {bar}</p> ..or.. $tpl2 = "<p>This is a test: {foo}, and this is another test: {bar}</p>"; $vars = [ 'foo' => 'FOO!', 'bar' => $pages->get('/')->title, ]; // Sometime later echo wirePopulateStringTags($tpl2, $vars); ..or you can use PHP heredoc $testing123 = "123"; $html = <<<HTML <div class='something'> <ul class='mylist'> <li>FOO!</li> <li>{$pages->get('/')->title}</li> <li>$testing123</li> </ul> </div> HTML; // Sometime later echo $html;
  12. I use Profield Table in my sites, I think this component is not for this specific case
  13. But for that only, you have the Children tab by default in each page, it have pagination and ajax loading
  14. Yes, thank you very much @dragan, I actually ended up using the findIDs call, but that's to querying the database .. my question refers to WireArray, because I supposed it would be faster to request the pages once to DB and then do the search operations on that array.
  • Create New...