Jump to content

elabx

Members
  • Posts

    1,303
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by elabx

  1. @MrSnoozles You could take a look at using Migrations + RockMigrations (which work great hand by hand!) which satisfies exactly this. So you only substitute the "migration files" system, but use the invaluable abstractions from RockMigration. @bernhard interesting idea the tracking within the fields!
  2. No worries mate! I precisely saw this issue commented here: https://github.com/processwire/processwire-issues/issues/1569 Did you see that or arrived to the solution by chance?
  3. remove() takes the key as argument, not the value. I'd wonder, if the WireArray is numerically indexed, would there be a way to use a selector to find the item to delete first?
  4. Hi @LexSanchez made a PR to support TikTok embed, thanks for this great module!
  5. You need to get $inputfieldTextTags from the field itself: $inputfield = $page->getInputfield('tags_field'); $list = $inputfield->getTagsList(true); foreach($list as $item){ // echo tags ? }
  6. This is useful? https://processwire.com/api/ref/inputfield-text-tags/get-tags-list/
  7. Oh yes, fix the ids selector! <?php foreach ($pages->findIDs('id=1223|1224|1225, sort=-created')->children as $item) : ?>
  8. I might have complicated this way tooe much maybe simply: $item->parent->id == 1234
  9. if($item->matches('parent=1223')){ ... } Maybe try this?
  10. Iterating for output shouldn't be an issue, could you post a more complete code sample?? I only see an empty for loop on your previous post.
  11. Before editing/saving any repeater item call: $item1->of(false); $item1->title = "new title"; $item1->save(); More info here: https://processwire.com/api/ref/page/of/ Repeater items are themselves RepeaterPage objects which is a class that inherits from Page, hence the formatting flag applies too.
  12. Can you try: wire('pages')->find("template=repeater_grid, mp4!='', ratio='', check_access=0"); find() won't find the repeater data pages since they would be restricted due to access control.
  13. For publish/hide you will only need to setup access control accordingly in the role that the users will have. Settings can be disabled with RestrictTabView. I think this is the one that might require some css to display none, or look for a hook where you could edit this markup.
  14. That's weird, they should show on any page that has the right template with the repeater and with the fields added to it. Do you have more info to share? Some screenshots maybe? And you shouldn't need to delete and repopulate anything, new fields should just show up!
  15. I think the error comes from trying to use PHP variables? I have approached this using the getSelectablePages hook and a couple others to enable dynamically adding them to different parents depending on their position within the tree,. (Bear with me since I am basing this example this from a very old project I have that "cascades" options into children page fields, it might not work exactly in a copy/paste fashion) Ok so this hook gets the pages only under the closest faq-parent of the current page with the reference field: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { $page = $event->arguments('page'); $event->return = $page->closest('template=faq-parent')->children('template=faq-category'); }); Now, the tricky part when doing this dynamically and adding new pages is selecting the right parent, which from some old code I have lying around has to be done sort of like this: $wire->addHookBefore('InputfieldPage::processInputAddPages', function($event) { $field = $event->object; $page = $field->hasPage; $parent_id = $page->closest('template=faq-parent'); $field->set("parent_id", $parent_id); }); And this last step I am not super sure, but I think it is needed to enable the Add New pages part. $wire->addHookBefore('InputfieldPage::renderAddable', function($event) { $field = $event->object; $page = $field->hasPage; $parent_id = $page->closest('template=faq-parent'); $field->set("parent_id", $parent_id); })
  16. I can confirm I use this a lot too!! It also merges updates on fields and templates. I think the only caveat I have is that it doesn't work 100% with FieldtypeOptions. And the pages import/export is crazy good, works with absolutely every native field I've tested with, even complex Repeater Matrix/Repeaters. I just recently used it to migrate some old sites, into a new "template field schema" and I cannot even estimate how much work it saved lol
  17. I think the current best way out to handle this is using RockMigrations. And yes, you write a migration script that runs on the live DB, to updated whatever configuration you need on processwire templates/fields. Be sure to have your backups in place ?
  18. I'm a big fan of HTMX. It's kindof like "lower level" than hotwire and not sure if even comparable to Livewire. And there is also the Intertia.js adapter if you want to take a look.
  19. @benbyf still in very early progress and I don't see how it would help with the front week view. The original module did have some rendering modules attached but those are the last priority in this refactor.
  20. Supposedly this dude is rebuilding it ? Ok seriously, trying hard, but my time is also limited right now, I almost have the UI rebuilt in Alpine, just need to wrap my head around the Fieldtype interface. But I'd say it's still at like 20% - 30% I am trying to get a run at it asap to build the bare minimum, without the Markup modules, which I also need anyway lol
  21. Hi @digitalbricks! Did you ever figure out what was going on? I am having a similar situation while loading two pw instances.
  22. Is it possible to do this now? Say, for example, I want to save a FieldsetPage doing something like: $page->setAndSave('button.url_address', $value); EDIT: I think it's not, just reviewed the Page class ?
  23. I read on twitter, "an HTMX ad!" ?
  24. Though I wonder what do you want to do?? To updated the title/description/image if it has changed?
×
×
  • Create New...