Jump to content


  • Posts

  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

1,816 profile views

lokomotivan's Achievements

Jr. Member

Jr. Member (3/6)



  1. Had this before, but only with the page title field. When you switch page-title field not to be multilang it works fine...
  2. $query = $modules->get('SearchEngine')->find($input->get->q); Is it possible to get a PageArray from this? So i can render my own markup... I know i can use "search_index%=q" to find pages, but i would like to take advantage of the module settings, so dont have to hardcode the operator... I'm trying: $results = $query->results; I get "Method Query::get does not exist or is not callable in this context" When i try "renderResults()" method, it works as expected. Never mind, solved it after looking into Query class. $results = $query->getResults();
  3. Like kongondo mantioned, you can refine the selector, for example you can include grandchild template: $pages->count("template=grandchild_template_name, name_of_checkbox_field=1");
  4. $pages->count("checkbox_field_name=1"); ๐Ÿ™‚
  5. Try to url instead of httpurl <img src="<?php echo $bild->httpUrl; ?>"> to <img src="<?php echo $bild->url; ?>">
  6. 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.
  7. 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; } }
  8. 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
  9. 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
  10. foreach($files as $filename) { $page->{$file_field}->add($upload_path . $filename);๏ปฟ }
  11. $fields->get("priduct_sku")->type
  12. 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.
  13. 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 ๐Ÿ™‚
  14. 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?
  • Create New...