-
Posts
7,473 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
The more I read this the more it sounds like what you are after are custom hooks?
-
I am curious about this as well Was it Joomla? Why did you decide to stop using Joomla? Why ProcessWire?
-
In that case, what @teppo said should do it (according to the docs in its support board): $pages->find("books.category=something, books.text=$letter");
-
Glad you find it useful ? Yes, thanks! This has been reported before but I've not yet had time to commit to the repo. Here's the previous post with the recommended fix ?
-
Hmm. I've never tried this but I am curious ProcessWire didn't complain about a custom field called 'name'. I would've thought that is a reserved word since ProcessWire pages field has a name column. Do you mean Select Options field (fieldtype)?
-
Great! Glad you got it sorted. Please explain what this means ? Zero? Wrong results? I'll try and replicate when I get a bit of time. Could you please clarify the field types in your selector? What is category and text?
-
Please explain, what is unusual? You have a data that is structured in an unusual manner or you think ProcessWire's database structure is unusual? If the latter, then many here will beg to differ ? Do you mean a page or module where you can view a page's data in this manner? Like in a spreadsheet? Or, do you mean a database that resembles a spreadsheet in its structure? If the latter, that's akin to a flat file database. ProcessWire uses a relational database. This model is not unusual at all :-). I don't understand this bit. What is the dilemna?
-
Your topic says 'pipe selector not working' There are two different uses of pipe selectors in your sample code. template=article|blog_post|book - OR selectors: matching one value or another (docs) title|body|author*=$q - OR selectors, matching one field or another (docs) Which one isn't working? Are you not getting any results or is it returning unwanted results? Are you sure it is not the AND selectors (docs) that are 'interfering'? Perhaps you want OR:groups (docs)?
-
[SOLVED] create field and add to template
kongondo replied to jploch's topic in Module/Plugin Development
Of course, you are right. I should have read the requirements more carefully :-). -
[SOLVED] create field and add to template
kongondo replied to jploch's topic in Module/Plugin Development
This assumes only one field of type FieltypePageTableExtendedGrid is present on the page, no? ? -
What is the actual way to start multiple instances? I get compile error
kongondo replied to horst's topic in General Support
Yes, thanks. @horst found out the same and wrote this tutorial ? -
German language pack (de_DE) with formal salutation
kongondo replied to dotnetic's topic in ProcessWire Language Packs
Whilst I appreciate the inherent advantages, I'd like to point out that the forum rules/guidelines currently don't allow this. Edit I see @teppo beat me to it :-) -
No. It could. Not worth the hassle. Instead, I'd suggest you try one of the 'restore' DB modules or at 'worst', do a manual save state of DB and restore it after each of your import script tests. Some candidates to do this: ProcessDatabaseBackups - https://modules.processwire.com/modules/process-database-backups/ (quick, in out, all or nothing) RockMigrations - https://modules.processwire.com/modules/rock-migrations/ (if you want fine-grained control BUT I am not sure how it deals with pages )
-
What is the actual way to start multiple instances? I get compile error
kongondo replied to horst's topic in General Support
Nothing newer. I use multi-instance recently and it worked fine. -
What is the actual way to start multiple instances? I get compile error
kongondo replied to horst's topic in General Support
This is a curious line. Why do you need this? Or are you ONLY using it if on CLI? -
Designme - Visually Layout Your Edit Screens - Preview
kongondo replied to joshuag's topic in Modules/Plugins
Moderator note: @MarkE, Moved your question to the module's support thread. -
Moderator note: @JeevanisM, please keep the same question in one place. Thank you.
-
With bells and whistles ?
-
You're da boss! ?
- 75 replies
-
Have you seen my response, 3 posts above?
-
Hi @Gideon So. Thanks for chiming in. I see we posted at the same time. Please let me state that this is incorrect. @spercy16's function is a recursive function ? It can be called inside itself. The code works just fine as it is (I tested it) ?
-
Hi @spercy16, Your snippet is working just fine for me. I am not sure what you mean by not working in my child pages but I think the reason is access issues. The following will not naturally show up in page finds: Unpublished pages Pages the user has no access to Hidden pages If your pages (including child ones) fall into any of those categories, they will not show up. However, if you need them to, you can override access control behaviours. For something like a menu, that may not always be what you want. For instance, if a page is unpublished, you want it that way for a reason. Please have a look at the docs (link below) for how you can use (for example, $pages->get('/')->children('include=unpublished')) overrides in your selectors. https://processwire.com/docs/selectors/#access_control Since you are new to ProcessWire, please note that overriding access controls using 'include=all' for the children of Home ('/') means you are asking ProcessWire to return all pages on the site, including admin pages, roles, permissions, etc, clearly not what you want. Additionally, calling $pages->get('/')->children without any limits, [e.g. $pages->get('/')->children('limit=50'))] can potentially lead to the retrieval of lots of pages (assuming you have a big site). A quick by the way, although this: foreach ($children as $page) does not affect the working of the function, since the $page variable is out of scope inside a function, it's just good to know that if used outside, it would have side-effects, i.e. overwriting the current page (variable). Maybe you knew this already. Otherwise, conventionally, some people go for $children as $child or $children as $c or $children as ....whatever, for consistency (and clarity) of use in and out of functions ?. Welcome to ProcessWire and the forums ?
-
I don't think you are doing anything wrong. I don't think we have a sanitizer for inline CSS. Regex maybe? https://stackoverflow.com/questions/2488950/removing-inline-styles-using-php https://www.sitepoint.com/community/t/remove-inline-style-with-preg-replace/21743 https://wordpress.stackexchange.com/questions/91949/removing-any-and-all-inline-styles-from-the-content https://www.php.net/manual/en/function.strip-tags.php#99643
-
Something like this... wire()->addHookAfter('Pages::published', function($event) { $page = $event->arguments(0); if($page->template !='blog-post' ) return; // ProMailer API TO SEND EMAILS // no need to return $event if you haven't modified it }); Talk to Ryan about ProMailer API if what you need does not exist here https://processwire.com/api/ref/pro-mailer/
-
I think you still need #1, but that's the easy bit ? https://processwire.com/store/pro-mailer/