-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Add a "X-Requested-With: XMLHttpRequest" header to the ajax call and $config->ajax will work.
-
Template caching and deactivating post and get variables - How to?
LostKobrakai replied to Juergen's topic in General Support
This should work, if the field is properly submitted with the contact form data. -
how to compare a password for changing password ?
LostKobrakai replied to adrianmak's topic in API & Templates
Just like you're comparing it for the login: hash the "current password" and compare it with the database entry. But pw does have you covered: $user->pass->matches($inputPass); -
It's the goto way of implementing responsive video or iframes.
-
Selector with two fields using OR operator fails
LostKobrakai replied to efiguerola's topic in API & Templates
It's not about the rel, but the parenthesis: https://processwire.com/api/selectors/#or-groups I just chose rel for "relationship", which is what you're dealing with. -
I'm also on current chrome (mac). I just noticed that I had to reload once yesterday before the content was displayed as xml and not text. Not sure why that happened. Scrap that. Logged in I'm getting application/xml. Logged out I'm also getting text.
- 29 replies
-
- 2
-
- issues
- processwire forum
-
(and 4 more)
Tagged with:
-
- 29 replies
-
- issues
- processwire forum
-
(and 4 more)
Tagged with:
-
Selector with two fields using OR operator fails
LostKobrakai replied to efiguerola's topic in API & Templates
parent is not a field in the traditional sense, but a native field and might therefore function a bit different. You could try: rel=(parent=$page), rel=(secondary_category=$page), … -
Seems like for that specific hook admin.php is called to late in the bootstrap process. But other than the timing there's no disadvantage in using admin.php to hold admin related hooks.
-
admin.php works just fine as well if the hook should really only run on admin pages.
-
Two page arrays result in this: date 1 | date 2 - 1 - 2 - 3 1 2 3 4 Or the other way around. It's not merging the dates. But if all pages are fetched no matter what (no pagination) it works like that: foreach($myPages as $p){ $p->set('sortDate', $p->date1 ?: $p->date2); // Runtime field } $myPages->sort("sortDate");
-
For me it's delivered as Content-Type: application/xml; charset=utf-8;
- 29 replies
-
- issues
- processwire forum
-
(and 4 more)
Tagged with:
-
If you're using the api in classes or functions these variables are not available as such. You'd need to use $this->wire('pages') or wire('pages') depending on the current scope.
-
Display "Related Data" From Page Field In An Admin Page
LostKobrakai replied to Gazley's topic in General Support
kongondo's module is basically what I suggested in module form, so I'd suggest trying that at first. -
Display "Related Data" From Page Field In An Admin Page
LostKobrakai replied to Gazley's topic in General Support
You can hook ProcessPageEdit::buildForm to dynamically add custom fields (e.g. InputfieldMarkup) to page edit forms based. Is that what you're looking for? -
Srcset and picturefill or if it needs to be super simple just a 2x low-quality image.
- 1 reply
-
- 3
-
Even guests have page-view access. Shouldn't this therefore deny the backend access control. Essentially I don't want all editors to be able to batch geocode addresses, but I'd like to use the module to geocode single instances in my templates.
-
With pages it's possible to circumvent access control manually in templates, but I've an page action module I'd like to control the access to in the backend. But this does prevent me from triggering the page action from my templates via the api, as users might not have enough access rights to use it. Is there any way around this?
-
Selector, sort by something a couple steps removed
LostKobrakai replied to SteveB's topic in General Support
There's one logically missing peace. How is the selector supposed to know which parent.marker does correspond to which mark. What's the correlation of markers and marks? -
My current grid system is this, based on inuit.css's layout object: Include the mixins and some media queries (99% only for updating the width) and most grids are done.