-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
@statestreet, I'm not sure but it does work fine. It's hard to tell from here. All I can say that it's not trying to match the title but the page name. Also it does have issues with that it uses strpos to find matches. Possible sideeffect would be that domain with subdomains wouldn't work I think. domain.com my.domain.com would get conflict with checking for the right current domain. I think this can be fixed with having a 1:1 match checking. But not sure it's what you experience. Although after all it's a big hack to get this multisite tree's working so it's always possible things go wrong. I still consider this a beta and while it's working I strongly recommend to only use it if you are completely aware of what it is doing. It may not suit all situations. @apeisa, I'm not keen to take the lead on this one. I got too many modules to support already. But I'm happy to help with getting it working or fixing something.
-
Save is outside foreach? This on saves the last page.
-
File Description Not Saving for Multi-file Fields in a Repeater
Soma replied to DaveP's topic in General Support
26 is higher than 8. -
My other me.
-
Hehe that's me actually.
-
Set input field to locked, but not collapsed.
Soma replied to renobird's topic in Module/Plugin Development
Ok, first take off your mask and try some harder. Collapsed sound more like well collapsed , not? -
Add a template redirect, add page select and in template file redirect to the selected page.
-
Works fine without saving for page select.
-
Define links go crazy.
-
Save is a Method save()
-
PWUtils - Idea for micro library of template functions
Soma replied to saml's topic in API & Templates
I like the idea and was thinking also about it now and then. But never could get my head around it. Either too inflexible, and adding another layer with something that may prove as "not so useful" or will at some point grow and change, that it may not be consistent over the time. I like your approach to have a simple base that you may adapt to your project. Here's what Ryan build some years ago when he built the blog profle. Took me a while to find my copy locally. I put it on github for other to see. At that time I was thinking to use it, or adapt it at some point but never picked it up.. Nevertheless interesting approach. https://github.com/somatonic/BaseMarkupExample -
You should practice what you preach... How comes everytime I look at user in forum you're searching the forum?
-
@digo, I wasn't responding to yours, which I haven't really recognized at that time. EDIT: after all it doesn't really matter for me, I only enter "p" and the autocomplete does it's job since processwire.com is most visited.
-
Too complicated You don't need to enter site:processwire.com/talk "keyword" in google search. I always just enter the search right in the browser adressbar like: processwire.com soma is best works in all browsers and I use it since many years.
-
To make this with save buttons you'd have to trick a bit. Here's a example POC module that adds a "Save minor" save button and increments a integer field on page. That field can be hidden, not visible on edit. https://gist.github.com/somatonic/11206761
-
There's no problem.
-
No date for a Datetime field would be...? So when no input format specified it will use default.
-
There's many ways to get to build a formular. I never used Bootstrap so I don't know what's needed (but can imagine) There's a markup and classes array to give the InputfieldWrapper that allows to customize some of it. That's more what than where. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/InputfieldWrapper.php#L71 https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/InputfieldWrapper.php#L642 Since each InputfieldWrapper and Inputfield gets rendered you could modify the render method with hooks. Or maybe just foreach the fields and echo out the inputs yourself. Just some random example, instead of $out .= $form->render() after a $form->processInput($input->post) $out = ''; foreach($form->children as $input){ if($input->getErrors()) { foreach($input->getErrors() as $e) $errors .= "<em class='error'>$e</em>"; } $out .= "<div class='field'><label for='$input->id'>{$input->render()}</label>$errors</div>"; }
-
"protected" means it's well "protected" I never use or used the var_dump to inspect PW vars or objects. It is just too messy and often leads to more confusion or wrong assumptions and ways to retrieve something that there may already a API method for that. Looking at a var dump doesn't tell me that. What I do is think of what I'm dealing with and look in the classes according to see what public methods there are I could use. Pageimages are special objects, containing your image(s) as Pageimage which extends Pagefile. Pagefile can be images or files. I look at wire/core/Pagefile.php Pagefile contains a get() method that allows to get the Page the (single) image object is from. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Pagefile.php#L140 So this gets me the page $p = $img->get("page"); equals to without get() $p = $img->page; This doesn't mean there's a object->page, but rather a magic get method mapping the call to a get("page") You can also get the Pageimages from a single Pagefile $pagefiles = $img->pagefiles; That gives all the other images/files from the same field (in case there's any) Pagefiles also has a method to get the page with a public method for example $p = $img->pagefiles->getPage(); https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Pagefiles.php#L81 So tons of ways and option, and none of it you'll get to know when doing a var_dump.
-
Yeah I'm still waiting for kongondo to write the definitive guide to MarkupSimpleNavigation
-
No they can't (not as is). As you also can't use Multilanguage inputfields. Repeaters are stored as pages somewhere else, while the module config is stored to the module table as json (?).
-
I'm a little surprised as this example comes from Ryan. The closing ) is something that happens all the time even to those into programming, but usually an error indicates that there's something missing. Well there seems to be a problem with the if($parent->child(....)) { ... } It will always resolve to true, even if no page with that title found. This is because such a search will return a NullPage object if none found. In a if() this will resolve to true. You'd have to add a little more to check if a page was found, like test for the id. if( $parent->child("title=" . $sanitizer->selectorValue($email))->id ) { ... } Now this works.
-
There's no OR for multiple field=value selectors. Only for fields and or values. Like field1|field2|field3=value or field1|field2|field3=value1|value2 So maybe this can work for you. $selects = $pages->find("template=child-template, branche|contract=$branche|$contract");
-
Better image management / better integration with WYSIWYG
Soma replied to mindplay.dk's topic in Wishlist & Roadmap
That unused space isn't there for me most of time cause I use image field often on a column 30-40%. -
Happened just few days ago with a user, he entered username and email... Maybe, just add a placeholder "username"