-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Filter results of selector using select/checkbox?
Soma replied to antknight's topic in General Support
Actually I think with: $page->child()->getInputfields() you get the inputfields from that page with the values for editing. I get errors when using it in outputformatting on... to get the fields you simply do: $page->template->fields; -
Filter results of selector using select/checkbox?
Soma replied to antknight's topic in General Support
This works for me: $page->child()->template->fields; What error are you getting adrian? -
Filter results of selector using select/checkbox?
Soma replied to antknight's topic in General Support
Its simple: $fields = $page->child()->template->fields; -
Can you tell a little more what the field settings are set to? Ok it's a litte special with this field because it also supports "range" setting (min,max). So it has two values actually and uses outputformatting because is an object behind the scenes. To set the value in template code you need to turn it off and use $page->of(false); $page->range->set("min", 3); $page->of(true); or $page->of(false); $page->range->min = 3; $page->of(true);
-
It is my range slider module right?
-
Filter results of selector using select/checkbox?
Soma replied to antknight's topic in General Support
I think this method to create a page with a template just to get the fields is not needed and I think if you have file field it will throw that error. I think it's better you get them just using $fields = $templates->get("mytempl")->fields; -
ProcessWire conference, Switzerland (central europe)
Soma replied to Soma's topic in News & Announcements
Welcome bbeer! -
I think theres possibly some inconsistent behavior with get and find when using more sophisticated selectors. Just use a find with a limit =1 and a first () chained.
-
So there is something wrong with that page? Is it unpublished or some permissions set? Any more details would help.
-
ProcessWire conference, Switzerland (central europe)
Soma replied to Soma's topic in News & Announcements
I didn't plan anything yet I just wanted to check how many would consider joining. Looks good so far -
There seems to be an issue with this how or where this locale gets set. It doesn't seem to recognize the langauge on front end. It always uses the user language set on user profile.
-
ProcessWire conference, Switzerland (central europe)
Soma replied to Soma's topic in News & Announcements
Tomorrow. -
I don't understand. What you mean with I have? front-end or backend? If you are in backend it will display date in the language your user is set to.
-
Never ever edit anything in wire folder. You can set that locale in the translation file for the particular language. The file is: wire--modules--languagesupport--languagesupport-module
-
Bootstrapping Processwire to my Websocket server problem
Soma replied to Harmster's topic in API & Templates
@kongondo hehe see? Well maybe a link to the board from the frontside. -
Bootstrapping Processwire to my Websocket server problem
Soma replied to Harmster's topic in API & Templates
Yes Just to clarify, do you mean a FAQ on the website because in the forums there's already a FAQ board? -
Bootstrapping Processwire to my Websocket server problem
Soma replied to Harmster's topic in API & Templates
I'm talking about the function scope issue and other tricky stuff that requires general coding knowledge. -
Bootstrapping Processwire to my Websocket server problem
Soma replied to Harmster's topic in API & Templates
As I recognize it, those people running into this, don't even know about it, how they gonna look on something they don't know about? -
Bootstrapping Processwire to my Websocket server problem
Soma replied to Harmster's topic in API & Templates
This particular subject has come up so often in the forum, because there's so many non-coders attracted by ProcessWire. Every coder knows about scopes and variables and it's the same in all programming languages. I'm sure even if there's a FAQ or documentation on this subject people will run into this when they get their hands dirty. It's much like jQuery doesn't have any documentation for the Javascript language as it's not in its scope. -
It should be $pages->get (1001)
-
Yeah, Ryan is the source https://github.com/ryancramerdesign/ProcessWire/blob/f82594bf64111091f66a99778433417b372cc664/wire/templates-admin/default.php#L68
-
Ah, ok must have missed that, and since it works anyway I haven't noticed. I corrected this in master and dev, thanks for finding it.
-
Autoincrement a certain field of a certain template
Soma replied to owzim's topic in API & Templates
Oh, another owzim question $val = $pages->find("template=mytempl, sort=-counter, limit=1")->first->counter + 1; -
See http://php.net to see what all you can do in ProcessWire For conditionals: http://www.php.net/manual/en/control-structures.if.php In PW short way is for example echo $pages->get("title|headline"); saying if title has value output title, otherwise get headline
-
Ok now it gets more clear. Couldn't those sockets be page fields? Well anyway, you don't have to use sanitizer selectorValue(). Just wrap them in 'value'. $pages->find("field*='E27'|'E27 + PowerLED'|'GU10'|'2G11'"); I'm not sure why + is in the sanitizer filter, but if you have to sanitize it coming from forms you could use $sanitizer->text(). Edit: Corrected example