Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Use something like this: foreach(… as $item){ … if($page->parents->has($item)) $class .= " current"; … } You just need to adapt it to your way of building the nav structure.
  2. I don't get some of the criterias you have on those methods. Why is speed a criteria for such rarely changing information as footer texts. Just cache it for like 24h and the speed of any used method is a non-issue. Also additional database tables (fields) are not really an issue, as it's mostly few additional bytes just like if you'd store the information in a file. The difficult parts (which really draw resources) that databases have to handle are other things. With that in mind i'd go for additional fields of method 2. either on the homepage on a dedicated settings page.
  3. Yep, it's part of the 2.6.5 updates: https://processwire.com/blog/posts/extra-action-in-your-page-list-processwire-core-updates-2.6.5/#get-extra-action-from-the-page-list-and-lister
  4. I'd really like to use this Hasklig or FiraCode, but sadly sublime text and phpstorm don't support open type ligatures.
  5. It seems you're missing a single-quote in your onsubmit attribute.
  6. The checkbox is next to the name field for each page. The one that's used for the /en/ part is the root page in the pagetree.
  7. To phrase my question more precise, does your homepage template have urlSegments enabled?
  8. PagePageHistory is a core modules, but it's not installed by default. Are you using any different urlSegment or pagination settings for those pages?
  9. It may work, but it could very well be as much fiddling as building it yourself.
  10. Ok, just notices, that my page field's changes are tracked as well as my custom module's. array(2) { ["subscribed_to"]=> array(1) { [0]=> NULL } ["mailchimp_newsletter"]=> array(1) { [0]=> NULL } } Can I somehow get useful values out of getChanges(true)?
  11. I'm currently trying to get a custom fieldtype, which uses InputfieldCheckboxes to work with trackChanges (show changed values as well), but I cannot seem to get it to work. It should just be a simple multiselect of subscribable newsletters, that are loaded from mandrill. Does anybody have any insights on how to tackle that? I need to be able to get the changes, so I can add/remove users from the mailchimp lists accordingly.
  12. Repeaters do prerender all their inputs and just hide them, so they are finit in number. The unlimited approach would be rendering a blueprint disabled "fieldset" and copy that with javascript, increment the form field names and show it.
  13. That's just a notification, because uberspace.com is running a automated script that detects the "Options +FollowSymLinks" in .htaccess files, which is not secure on a shared hosting, and replaces it with the more secure "Options +SymLinksifOwnerMatch". But the first setting is the defacto default setting, which is used.
  14. I'd just use the browser devtools. Inspect the autocomplete field and copy over the rules. Also there are certainly tools out there that can convert minified css back to readable state, you should never have to read code in a single line.
  15. $wire->pages->find("images.count>0"); But keep in mind, that this will get you a PageArray, which you need to loop over, while your current selector only grabs the first page matching the selector.
  16. Could you provide the code in any way? Without more information I think it'll be hard to help you, as normally either a module isn't loaded all together or it's throwing some errors.
  17. So you've installed the PagePathHistory module, does disabling the module (maybe on a local enviroment first) change anything in the 404 behavior?
  18. I guess the question with ProcessWire is rather, does the code you create conform those suggestions? From a quick dash through their php cheatsheet it seems that the core is honoring a least most of those, but to be sure you'd need Ryan's answer.
  19. Ahh, while I can see it, I'm not sure people will necessarily read it, so for future posts just include it in the post as well.
  20. The below is essentially the same as Martijn's, but less descriptive. You're working with a wrong concept on how pw works. $usedTemplate is a Page (while the name suggests it being a template) that holds the value(s) of the field "image", but you get them by calling either $usedTemplate->images or $usedTemplate->get("images"). $usedTemplate->fields will get you all the field objects (not values), that are defined for the template the page is using. The field object doesn't hold any values, but describes properties and methods than the field needs internally to work.
  21. Please enable debug mode and in the backend's footer you'll find the debug tools. Could you take a look at the "Hooks" if there's anything hooking into ProcessPageView especially pageNotFound().
  22. Could you please provide the used processwire version as well?
  23. I have used a homemade solution to display information of related pages in the editor, which are needed to know how to handle the page (essentially user requests).
  24. The latest blogpost suggests, that there will be a 2.7 stable version, before 3.0.
×
×
  • Create New...