Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Clarity last won the day on April 19

Clarity had the most liked content!

1 Follower

Profile Information

  • Gender

Recent Profile Visitors

907 profile views

Clarity's Achievements

Sr. Member

Sr. Member (5/6)



  1. Hello, @teppo and everyone! Can you please tell me how to modify the query during search?
  2. Hello everyone! I'm using "use" statement in controller like this: <?php namespace Wireframe\Component\MyComponent; use Wireframe\Lib\Utils; class MyComponent extends \Wireframe\Component { ... } Then it works in component view iff I write use Wireframe\Lib\Utils; in component view, otherwise I get an error: Class "ProcessWire\Utils" not found. Can you please tell me if it is possible to use utility class in component view if it is explicitly used only in component controller?
  3. Hello everyone and @kongondo! Can you please tell me how to create a dynamic menu using your module? Where URLs of pages are relative not to a whole site, but to every page where we use this menu.
  4. Hello everyone! Can you please tell me how to save a page after other page becomes hidden? Something like: $wire->addHookAfter('Pages::hide', function($event) { if(wire()->page->id == $event->arguments('page')->id) { wire()->pages->find('selector for page')->save(); } }); But Pages::hide won't work because class Pages doesn't have such a method. Which method of which class should I use?
  5. Hello everyone and @ukyo! Can you please tell me how to deal with this error? Argument 1 passed to ProcessWire\FieldtypeMystique::loadResource() must be of the type string, null given, called in /home/i/ivangr/tverkurort.ru/public_html/site/modules/Mystique/InputfieldMystique.module.php on line 175. My Mystique code is: <?php namespace ProcessWire; return function ($page = null, $field = null, $value = null) { ... };
  6. Hello everyone! Can you please tell me how to exclude hidden repeater fields via API? E.g. something like $page->repeater->find('exclude=hidden').
  7. If I'll really need PageReference, I think I can use hook + JS which was mentioned in the topic above. However, I found that using PageReference for my needs is superfluous, I can simply use ->find() method instead.
  8. I found a solution: increased numPageLinks from 5 to 10.
  9. Hello everyone! I have an issue with MarkupPagerNav module. When I have 6 pages and stay on pages 1-4, the separatorItemLabel is being shown between 5 and 6 while it shouldn't. My options are following: $options = array( 'numPageLinks' => 5, 'nextItemLabel' => '>>', 'nextItemClass' => '', 'previousItemLabel' => '<<', 'previousItemClass' => '', 'lastItemClass' => '', 'currentItemClass' => 'active', 'separatorItemLabel' => '<span>&hellip;</span>', 'separatorItemClass' => '', 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>", 'currentLinkMarkup' => "<span class='current-page' href='{url}'>{out}</span>" ); Can you please tell me where I am wrong?
  10. Hello everyone! I have a PageReference field and I need to get a selector of resulting PageArray for the purpose of setting the limit of these pages in order to use it in the pagination. Can you please give me an advice?
  11. Hello everyone! I have a HTML code for the form: <form class="contact-form" action="/ajax-handler/" method="POST"> <input type="text" placeholder="Name"> <input type="text" placeholder="Phone"> <input type="text" placeholder="Message"> <button type="submit">Submit</button> </form> I have an JS code which handles it via AJAX request: $(function() { var form = $('.contact-form'); $(form).submit(function(e) { e.preventDefault(); var formData = $(form).serialize(); $.ajax({ type: 'POST', url: $(form).attr('action'), data: formData }) .done(function(response) { alert(1); }) }); }); However, when I open "Network" tab in Dev Tools, I see that the request goes to the same page where the form is being placed, not to /ajax-handler/ page. Can you please tell me where I was wrong?
  • Create New...