-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
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.
-
-
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.
-
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
-
I'd really like to use this Hasklig or FiraCode, but sadly sublime text and phpstorm don't support open type ligatures.
-
Problem: Ajax -requests getting 301 redirects
LostKobrakai replied to foobar123's topic in General Support
It seems you're missing a single-quote in your onsubmit attribute. -
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.
-
To phrase my question more precise, does your homepage template have urlSegments enabled?
-
PagePageHistory is a core modules, but it's not installed by default. Are you using any different urlSegment or pagination settings for those pages?
-
It may work, but it could very well be as much fiddling as building it yourself.
-
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)?
-
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.
-
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.
-
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.
-
Getting first image of an image field in ajax php file
LostKobrakai replied to Henrik's topic in General Support
$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. -
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.
-
So you've installed the PagePathHistory module, does disabling the module (maybe on a local enviroment first) change anything in the 404 behavior?
-
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.
-
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.
-
Getting first image of an image field in ajax php file
LostKobrakai replied to Henrik's topic in General Support
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. -
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().
-
Could you please provide the used processwire version as well?
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
LostKobrakai replied to kongondo's topic in Modules/Plugins
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). -
Next production version of PW, after 2.6.1?
LostKobrakai replied to Peter Falkenberg Brown's topic in Wishlist & Roadmap
The latest blogpost suggests, that there will be a 2.7 stable version, before 3.0.