Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Every field is reusable in ProcessWire out of the box. This is how it works by default with processwire. You create the fields, create templates, assign the fields and optionally give the template a file to give it a view and to write markup or logic in it. For repeatable element we have Pagetables, Repeaters etc. All working with the above concept.
  2. You could put those items in a parent under /processwire/
  3. I would disagree on the last one. For bigger systems let the writers focus on the content not on the visual output. When you let them focus on desktop experience changes are they will write for desktop. In my opinion content should separated from view, articles should be device independent. For you as developer you have to give them the fields they have to fill in. This way you can get the content that is suitable for the platform where you wish to publish it. In my opinion: A system should be a content management system (CMS), not web publishing tool per definition. The content should be written platform independent, (Not writing for a specific device).Provide enough fields to pull from, when the need is there. The content should be modularity, so that it's it's easy to add different types of content.Your example of page table would work. Insure your data is accessible and could be queried from other platforms (JSON API). Don't pollute your data with structural markup.Don't use div's or image strings etc in you text directly. Use Page tables or something for images, video's etc.
  4. AdminCustomFiles/ProcessPageEdit.js is not a folder, it's a file. (I should raise an error over there)
  5. @Ivan, Take a look at https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/?p=84916 to hide pages. (See settings Tab of the page)
  6. @tpr, that is great !
  7. What I use a lot is: ob_start(); include('tralala.php'); $var = ob_get_clean(); This way tralala.php has access to all variable above ob_start(); (no need to pass it variables)
  8. Never knew you could double click it... Still I don't like it.
  9. Floats go out of you normal dom flow so without doing nasty CSS tricks in combination with event bubble prevention there's not much you can do about it I guess.
  10. You can always use the array_values() function to get an indexed array. array_values($page->logos->getArray())
  11. On my former job we had several servers all with different versions of plesk. For each server we used the Reseller part of plesk and managing a multitude of hosts. The biggest problem are all those options and screens and on every single version it is arranged in other places. Finding the things I need was quite challenging for me. Arjen introduced me to SeverPilot (kind of wrapper for Digital Ocean) and I love it.
  12. Glad you found it... ps, Plesk is ugly...
  13. I like it first !
  14. I guess when you add an extra column to that table you can can solve it with PHP. The script loops over over each row, and you could modify it as you wish.
  15. Not in my example , they only can remove the value, not the variable.
  16. @tpr: The problem with that approach is clients can mess with your variables. And if they can, they will do.
  17. A settings field based on a hooked Profields Table. When running the code (in the spoiler), superusers are able to edit, drag & delete all, while other users are limited to edit the setting only. (Thanks MacRura for the idea) Superuser sees: Everybody else sees: Code lives in the spoiler. Maybe some time I build a Module for this one.
  18. @Tom. I would also love to see those Pages, Setup, Modules, Access would honour their addresses and go to there when clicked. Exactly in the same manner as you've sketched.
  19. This is more of a Fancybox question than a ProcessWire one. But something along the below lines might work. Be aware that it is not tested. $(document).ready(function () { $(".fancybox").fancybox({ helpers : { title: { type: 'inside'} }, afterLoad: function () { this.title = $(this.element).find('img').attr('alt'); } }); });
  20. There are a few advantages using double quotes for strings. It's not uncommon that sentences have single quotes like this sentence. When sticking to double quotes it is more unlikely that you have to change your quoting style and get mixed quotings styles. Next variables are processed in double quotes. I prefer writing PHP containing HTML above HTML containing PHP. So the single quote HTML tags makes perfectly sense to me.
  21. What is the problem of thousands of pages? PW can handle a multitude of that without problem. Sorry I don't understand the question. I doubt that the browser can handle 10.000's inputfields at ones, so that problem is more about the client side then severside. Handling big data is easily done with ListerPro. Out of experience, managing 500.000 pages with ListerPro is not a problem.
  22. @h4r4ld Every page needs to have a parent except the home page
  23. @h4r4ld, have a good read about selectors 99% is explained in those docs.
  24. From the docs: $sanitizer->selectorValue($value) Sanitizes a string that needs to appear in a selector value. Replaces disallowed characters with spaces. If value is not already quoted, it will add quotes if it determines they are necessary (like if it contains commas). It limits the length to 100 characters (multibyte safe).
  25. You do yourself and others a favour, format your code nicely. Debugging formatted code is so much easier.
×
×
  • Create New...