-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Problem with OR statement and native page fields
Soma replied to MadeMyDay's topic in API & Templates
You're almost right. But it's not what he wants actually. He wants to have all pages that where created XOR modified. Using "," will only return pages that are modfied and also created by the user, like you mention (both must be true). So it's "only possible" with splitting it in two separate queries and merge them. -
You're right. It's actually because it's also not in the docu. Will add it later, thx.
-
When cloning a template that has template context setting on fields (ie width), the settings get lost.
-
Problem with OR statement and native page fields
Soma replied to MadeMyDay's topic in API & Templates
Not sure what's wrong. It works as it should for me... I would get "1002,1004,1006", it actually xor I think. -
Although it's not completely complete I think...
-
I'm sorry. I would love to help, but I'm too busy with my own projects, fulltime job and family. Hope you find someone.
-
If you can I would use symlinks to have one set of templates and link folder or single files to the local site.
-
Ah, sorry for not getting it first time. Simple but not that easy that I could just write the code here. May I refer you to this?
-
Thanks apeisa! Yeah very mysterious I just asked them to list processwire.com under credits, so it's there now.
-
Admin -> Modules -> Password Forgot module (install). Enjoy
-
Depends on how you code that part. So I'd guess (without seeing your code) you have some echos in there that isn't conditional.
-
I was also able to reproduce the image part. It now works with the latest. Thanks Ryan! Haven't tested google maps.
-
Admin Data Table and rows starting with numbers cause problems
Soma replied to teppo's topic in General Support
Ah, sorry I didn't get it that's on user list. You're right, user names with only numbers breaks the output. In DataTable, if a row array entry is a key=value, where value would be a url, it will be outputed as link automaticly... $row["username"] = "edit/?=123"; This is the code that does it on user list in ProcessPageType.module : foreach($fieldNames as $name) { if(!$n) $row[(string)$page->get($name)] = "edit/?id={$page->id}"; else $row[] = $this->renderListFieldValue($name, $page->get($name)); $n++; } So you're right. Even though the key should be a (string) it doesn't work with a number. -
Glad I could made your day!
-
Admin Data Table and rows starting with numbers cause problems
Soma replied to teppo's topic in General Support
I can't reproduce this. Works all as it should. But I think you're missing the "setEncodeEntities" setting. $dt = $this->modules->get("MarkupAdminDataTable"); $dt->setEncodeEntities(false); ... -
Marc, you can see something interesting here http://processwire.c...e-nav-in-admin/ +Also Ryan still has to answer my question there You can load most modules and output them in your process module. You can use Data Table Markup module or an submit button... $dtable = $this->modules->get("MarkupAdminDataTable"); .... $out = $dtable->render(); Of course you can also output any code you like, or include a framework, a module of your own...
-
You could easily make something like this with using urlsSegment on templates. $action = $input->urlSegment1; $method = "_$action"; if(function_exists($method)) echo $method(); function _addItem(){ return "Item added"; }; Then you can use something like /mypage/addItem/
-
slkwrm, I have tried, but can't reproduce here. It always stays as it should when I hit save.
-
Just tested on my local install. Cloning nested pages with repeater now work. So far nothing get's added or deleted. Thanks Ryan!
-
Looks like the date class isn't loaded. Make sure you have all classes in /.flourish and not in a subfolder. So should be like /.flourish/fDate.php.
-
Hey marc, as Ryan already stated, changing this core functionality would require A LOT of changes, additional complexity... The ___path function of pages is certainly hookable and possible to rewrite urls, but then you'll have not resolving urls, and the journey continues. You'll certainly run into problems not being able to pull it off because it can't be done or has side effects. As suggested using mutliple trees is the most slim solution. I'm thinking about this subject a long time, and refused to really ask for such a feature because I knew Ryan's answer already. All projects I did at work are multilingual and I solved it always using multiple trees. It makes a lot of thing easier and you doesn't need to consider "will this work here" and start fighting the system. Also you are flexible as much as possible. What I additionally tend to do, is to use "central" content where it makes sense (properties), that's put outside the language tree and then use urlSegments and the language information, to pull the content and display. Urls set in TinyMCE can also be parsed by a runtime hook after Page::render, you then search for certain url structure and replace it with the one you need. I've also done it with simple sections for a online shop (bag-shop.ch) where the products are outside the language tree and the collection page just renders them and product urls get rewritten using the hook technique described above.
-
Best practice for staging to live database synchronization
Soma replied to evanmcd's topic in General Support
And even for this issue there's a module -
There should be a xhr request being made when loading the page. Is it somehow returning an error that's useful?
-
Hey alan, thanks! Glad you like it.