Jump to content

Martin Muzatko

  • Content Count

  • Joined

  • Last visited

Community Reputation

21 Excellent

About Martin Muzatko

  • Rank
    Full Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Stuttgart, Germany
  • Interests
    Everything Webdev.
    I'm a passionate Designer and Developer. Always eager to bring love to the world in shape of software and knowledge.

Recent Profile Visitors

5,707 profile views
  1. Is "custom_sort" a builtin of processwire? I wouldn't want to implement an extra field for that. Also: Since contentmodules can also be re-used on other pages, I don't know if setting the sorting on the page itself would help.
  2. I need to programmatically SET the order/sorting of the pages, not when getting the pages from the page selector field. The problem is, that setting the manual sort value of the page won't help, as they are neglected by the page reference field. To tell the full story: I'm building a CMS in a CMS. pageModules are set via Rest API: function setPageModules($page, $data, $contentPage = false) { $page->of(false); $pages = $page->pageModules; if (!$contentPage) { $contentPage = wire('pages')->g
  3. Hello! I want to set the manual page sort of a page reference field with a pageArray. I found this existing thread which does not answer the question unfortunately. https://processwire.com/talk/topic/18510-sort-page-reference-field/?tab=comments#comment-162124 It looks like there are different concepts of sort. One that works with properties (sort=created) and one with a page as argument and index as second. However, I found this in wire\modules\Inputfield\InputfieldPage\InputfieldPage.module, that may explain how sorting is done when doing manual drag and drop. How ca
  4. Hello! Can somebody else please take care of this? I'm deep in projects as of now. Otherwise, I will look into it later. Best, Martin
  5. See gif: When I use $sanitizer->pageName() to sanitize a title as name, I get a different result from what processwire automatically replaces, when editing the name in the CMS. I have to manually replace the dashes and even dots! I would expect the name to be equal to the last segment of the pagepath.
  6. It might be important to note, that while the path can be accessed via ->path, if the field is a multiple-image field. (Pageimages) Otherwise, for single items, it has to be ->pagefiles->path. At least this is what I have experienced. Not sure if I am doing something wrong
  7. I have the same problem. I can confirm it is not really a bug but unwanted behavior @ryan. It occurs, that when you delete pages and create ones (with the same name? in the same run, there is a problem with the correct page to be found. As the page still exists. Is there a way to delete a page not after the entire page call is done? I supposed there is some smart mechanism to make only one SQL query, instead of synchronously deleting pages. Thanks in advance. Right now, I have to resort to two page calls.
  8. If you haven't given #BEM a chance yet as #CSS architecture, I recommend this article https://t.co/BCR5ErmmFT by @sitepointdotcom :)

  9. I "fixed" it. I created a module that loads the pageTypes for me. <? public function init() { $this->addHookBefore('ProcessPageView::execute', $this, 'loadPageTypes'); } public function loadPageTypes($event) { require_once('site/templates/classes/PageTypes/Event.php'); } This makes the Page, when loaded by ProcessPageView, also available, and thus gets assigned the correct PageClass. Phew! I am not sure this is the best solution. Right now, it is all I have to fix it. Please let me know if there is a better way. What if I want to create a Composer/Proces
  10. I found the cause, but I don't know how to fix it. I think the Event.php Page class has to be loaded before PagesLoader checks for wireClassExists($template->pageClass). How should I go about that? If I package it as module, will it be loaded before the check? I am using Composer for my profile/theme and I autoload my pageTypes using psr-4. I guess the check comes before any _init.php is loaded. Somehow, there must be a possibility to hook into the render method to load the custom pagetypes before checking for wireClassExists in the PagesLoader.
  11. Hello! I started to implement this tutorial today. I am a little stuck with the advanced options. If I load a page, it is not of type Event, but if I get - for example - the next page, it is of type Event. It is always the loaded page, that is not of type Event, but of type Page. I think this is a bug in Processwire. To give you a better overview, this is what my events pages look like: Template, test-event and Another Event are all of template event. This is my Events PageType <?php namespace ProcessWire; class Events extends PagesType { public function __
  12. Hello! When I create a custom pagetype by extending the Page class, as explained in the guides, all works good so far. However, if I want to get data of that page (like its children, etc) the data only seems to be initialized after calling a method. <?php namespace ProcessWire; class Event extends Page { public $registrations; public $items; public function __construct(Template $tpl = null) { parent::__construct($tpl); if(is_null($tpl)) { $this->template = $this->wire('templates')->get('event'); } if(!$this->parent_id) $this->set('parent_i
  13. Hi there @bernhard. This totally makes sense I didn't think about that I can already use the $user-> methods in this context. Awesome! I got tracy debugger installed, I just have to bring myself to use it more often Thank you a lot for the help, it is very much appreciated.
  14. @duckduckgo Do you have any plans to make the new bang suggestion process transparent? I can't even see if someone has already suggested it.

  15. Dear #javascript. Today I found out, that instead of blaming the back-end, I need to pass the credentials option for fetch to send cookies.

  • Create New...