Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by kongondo

  1. Hello @ivineet9, Welcome to the forums πŸ™‚. Most likely using a RESTFUL API or multi-instance ProcessWire if both sites are on the same file system. Mind, these will only get you as far as the data. If you want to 'see' the admin of the other site in the backend site, you will need to develop a Process Module. There are a couple of threads in the forums that discuss how the admin panel can be locked down to 'mimick' not accessible (redirects after login, hard-to-guess-admin-url, ProcessWire outside webroot, etc) but you cannot fully get away from an admin (unless I have missed new a trick or two).
  2. Just to add to the discussion....how Laravel does it: https://laravel.com/docs/7.x/events
  3. The more I read this the more it sounds like what you are after are custom hooks?
  4. I am curious about this as well Was it Joomla? Why did you decide to stop using Joomla? Why ProcessWire?
  5. 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");
  6. 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 πŸ˜„
  7. 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)?
  8. 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?
  9. 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?
  10. 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)?
  11. Of course, you are right. I should have read the requirements more carefully :-).
  12. This assumes only one field of type FieltypePageTableExtendedGrid is present on the page, no? πŸ˜„
  13. Yes, thanks. @horst found out the same and wrote this tutorial πŸ˜„
  14. 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 :-)
  15. 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 )
  16. Nothing newer. I use multi-instance recently and it worked fine.
  17. This is a curious line. Why do you need this? Or are you ONLY using it if on CLI?
  18. Moderator note: @MarkE, Moved your question to the module's support thread.
  19. Moderator note: @JeevanisM, please keep the same question in one place. Thank you.
  20. With bells and whistles πŸ˜„
  21. You're da boss! πŸ˜„
  22. Have you seen my response, 3 posts above?
  23. 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) πŸ˜„
  24. 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 πŸ™‚
  25. 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
  • Create New...