-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
There's a nice tuto by Ryan https://processwire.com/talk/topic/4834-simple-hooks-tutorial-turn-a-pagearray-into-a-list-of-links/
- 11 replies
-
- 1
-
-
Simple logic issue of your code. 1. User logged in? ... redirect 2. Form submitted, check and login 2. User not logged in show login After sending the form, he's not yet logged in... you log them in later (but still show the form as if not logged in), but don't redirect after the login. So you get what you have.
-
how do i address a field with multiples images, that is in another page?
Soma replied to lsag's topic in General Support
If you access the field you get a WireArray of image objects, and each has a method url (I think), it's not a property or a field. $imgs = $pg_settings->get("banners_slideshow"); $imgs->first()->url; // the first $imgs[0]->url; $img->eq(0)->url; // etc foreach($imgs as $img) echo $img->url; Forget about print_r() on arrays and object, you won't get useful infos most of the time it's overkill. Maybe have a deep read here http://processwire.com/api/fieldtypes/images/ -
I had similar issue from 2.3 something to 2.4 something where editor could not edit pages anymore. I had to open roles and save to get it working again. Nobody knows why. I filed an issue back then but Ryan doesn't know why. Which scares me a little. Cause theres also some other things that are happening that nobody can explain why. Sometimes it's hard to tell and not able to reproduce. I had similar issue from 2.3 something to 2.4 something where editor could not edit pages anymore. I had to open roles and save to get it working again. Nobody knows why. I filed an issue back then but Ryan doesn't know why. Which scares me a little. Cause theres also some other things that are happening that nobody can explain why. Sometimes it's hard to tell and not able to reproduce.
-
Nope, It's not even finished.
-
I'd go for birds or rockets. The sky is the limit.
-
I would ask Ryan to make the method hookah Le. So no need for extendingm I think it can be useful in cases like this.
-
Maybe a check to see if the checkbox has changed? $changed = $page->isChanged("mycheckbox"); Or there's a ___saved() hook ___saved(Page $page, array $changes = array(), $values = array()) Untested example wire()->addHookAfter('Pages::saved', function(HookEvent $event) { $page = $event->arguments("page"); if($page->template != "mytemplate") return; $changes = $event->arguments("changes"); // array of changed fields if(in_array("myfield", $changes){ // do stuff } });
-
I tried to reproduce here and no luck. I fix error and everything works fine. I'm working with lots of modules since a long time and also got errors and stuff, but never actually something that would stop PW working after fixing it. Edit: usually when something strange, deleting /assets/cache/ files does clean things, or a module "refresh" which does the same. I think $config->dbCache isn't something that has to do with module and other caches, it's for queries. PW has introduced (2.5 or earlier) some sort of cache I think as there's a table "cache", I think that get's cleaned on a module refresh but not sure. Anyway nothing to do with dbCache setting (but could be wrong)
-
Without knowing what you did its not possible to say much without seeing the module. Can you post the modules in question?
-
I'm still not sure how all that is different from what Pagetable already does. I create block templates with the fields I need then add it to a pagetable field and use the template files to output the blocks. They can be sorted and published etc. It's easy to setup and use. Pagetable extended by mademyday can be used to see the output directly in the pagetable. I can be used for different things not just blocks. What else is there needed?
-
I think there was or still is sometimes an issue with manual sorting, but can be sorted out with $pages->find("parent=/themen/, sort=sort");
-
This is a issue since long time. It's that page parent doesn't get updated. I ran into it with moving page with children... but I think clone has the same issue... Snot sure it's same issue. But try moving page with children to other parent and back.
-
RT @processwire: Introducing ProcessWire ListerPro – A powerful new way to browse and manage your pages – https://t.co/BxfHF9Qbj2
-
It's also like -= +=
-
Happy birthday Ryan!
-
Ability to edit pages from a Page field
Soma replied to thetuningspoon's topic in Wishlist & Roadmap
I thought about it million times so plus one. But then this functionality is in Asm select just not active. I would love to see Lister type search for adding pages to page field. But pro lister is commercial .. too bad. -
I have lots troubles writing on my new mobile. It's horrible.
-
You could also say because of this particular template setup pw lost many advanced devs before even looking further. +1 what joss said. That's where I see PW struggles a lot. Living in between advanced and casual is always a bad idea/decision.
- 206 replies
-
- 3
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
First get the the pages you want to delete and then delete them.. not searching a reference with a page you already deleted.
-
But second find won't return result.. ? Doesn't matter if page object is still in memory. Can't see anything else cause it's no problem to delete pages.
-
You delete the first so second reference in find does NOT work cause its not there anymore...
-
How is this different than https://processwire.com/talk/topic/7044-release-flagpages/ ?
-
I think you do maybe not really understand and my fault to mention "template engine". There's not template engine other than what PW has. I don't have a "template engine" on top of already existing template engine. I'm just using <div><?php echo $variable ?></div> and some simple logic if and foreach's, no template engine at all. Anyway It's all there and you don't have to built something, just structure differently.
- 206 replies
-
- 1
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with: