Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

51 Excellent

1 Follower

About lokomotivan

  • Rank
    Jr. Member

Recent Profile Visitors

1,677 profile views
  1. Try to url instead of httpurl <img src="<?php echo $bild->httpUrl; ?>"> to <img src="<?php echo $bild->url; ?>">
  2. I asume you are talking about the page reference field. With "Select Options Fieldtype" you define options in field settings, while for page reference field, you use pages as options (any pages), you can select pages by template, parent page, or a custom selector etc... For the dropdown, you have to write your own markup, processwire doesn't do any automatic front-end work for you.
  3. This solved the issue. Was busting my head a lot THANK YOU @Zeka! 🙂 Just to note that u also need getPage() method in your module. class MyModule extends Process implements WirePageEditor { public function getPage() { return $this->page; } }
  4. Thanks for the tips @Zeka. Yes having same issue when creating new pages , they are inactive for all other languages. I solved this for now by checking if page is active for another language on page edit, based on language id, eg: $page->status1105 public function executeEdit() { // breadcrumb $this->fuel->breadcrumbs->add(new Breadcrumb($this->page->url, $this->page->title)); // Force activate multi-language page variations foreach($this->languages as $lng) { $id = $this->sanitizer->int($this->input->get->id); $p = $this->pages->get("id=$id"); $status_field = "status{$lng}"; if($p->{$status_field} != "" && $p->{$status_field} != 1) { $p->of(false); $p->{$status_field} = 1; $p->save(); } } // Execute Page Edit $processEdit = $this->modules->get('ProcessPageEdit'); return $processEdit->execute(); } In this case i loose ability to deactivate the page for some languages but for now i can live with it. Creating a custom add new page is also an option, /module-manager/new/, and writing a custom form for adding new pages and handle it manually. But for page edit is not so easy
  5. Hey guys, i built a custom process module so i can edit pages from the custom ui. Everything works great except that multi-language page name fields does't show up in the settings tab when i edit the page from custom ui. See attached image... I use `executeEdit()` method in my module: public function executeEdit() { // breadcrumb $this->fuel->breadcrumbs->add(new Breadcrumb($this->page->url, $this->page->title)); // Execute Page Edit $processEdit = $this->modules->get('ProcessPageEdit'); return $processEdit->execute(); } Any tips? Thanks
  6. foreach($files as $filename) { $page->{$file_field}->add($upload_path . $filename); }
  7. $fields->get("priduct_sku")->type
  8. Yep, i think that should be expected. In my case there was no segment in the url just option enabled. Ill test it again, maybe i missed something.
  9. No segments defined, "just Allow URL Segments?" option checked. When i uncheck it, it start counting 🙂 Edit: Otherwise works great, thank you for this module 🙂
  10. It doens't work if you have have "Allow URL Segments" option enabled on the template, at least not in my case. Can this be fixed?
  11. You could check if speaker exists, but why do you have empty speakers in backend? In this case you can check for title or thumb or any requierd field <?php foreach($page->speaker as $speaker) { if(!empty($speaker->photo) { // speaker markup } } :
  12. Maybe u can try putting "./" in your filter form action link ./?studio=london <a href="./?studio=london">London</a>
  13. You can use JSON.stringify(data) Edit: Sorry ddint read ur post entierly :). Why dont u for example add data="<?=item->id?>" attribute to each button, then in ur script get the value var itemId = $(this).attr("data"); var data = { id: itemId, }; $.ajax({ type: "POST", url: "/intra/status/", data: JSON.stringify(data), success: function(){ console.log(itemId); } });
  14. Try this: <?php $get_field = $fields->get('some_field_name'); $field_options = $get_field->type->getOptions($get_field); foreach($field_options as $option) { // }
  • Create New...