Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Sergio last won the day on April 21 2018

Sergio had the most liked content!

Community Reputation

594 Excellent

1 Follower

About Sergio

  • Rank
    Sr. Member
  • Birthday 04/13/1979

Profile Information

  • Gender
  • Location
    Belo Horizonte, Brazil

Recent Profile Visitors

6,579 profile views
  1. Yes, is not the best solution from a UX point-of-view. But I don't think that adding it below the title, as WP does, is the best way around. In most cases, we don't want the user to edit the page name by mistake. In your situation, I would take a look at @adrian's PageRenameOptions module https://modules.processwire.com/modules/page-rename-options/. Another option is to add a warning, using a hook, if the page title is edited to alert the user to also change, or check, the page name on the Settings tab.
  2. Yes, it's possible. Set $config->advanced = true; on your config file and a "System" tab will appear while editing the template. And there you can make the change. See screenshot. Similar thread:
  3. You can pass a "numPageLinks" option to the $page->render method, like so: $options = array( 'numPageLinks' => 10, 'nextItemLabel' => '<i class="uk-icon-angle-double-right"></i>', // 'nextItemClass' => '', 'previousItemLabel' => '<span><i class="uk-icon-angle-double-left"></i></span>', // 'previousItemClass' => '', // 'lastItemClass' => '', 'currentItemClass' => 'bg-orange', 'separatorItemLabel' => '<span>…</span>', 'listMarkup' => "<ul>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}' class=''>{out}</a>", 'currentLinkMarkup' => "<span class=''>{out}</span>" ); echo $pager->render($posts, $options);
  4. <?php // did we find any matches? if(count($matches)) { // yes we did, render them echo ukAlert(sprintf(_n('Found %d page', 'Found %d pages', $matches->count), $matches->count), "default", "list"); echo ukDescriptionListPages($matches); } else { // we didn't find any echo ukAlert(__('Sorry, no results were found'), "danger", "warning"); } ?> After that, edit your language on admin and translate the strings on the search.php file. https://processwire.com/docs/multi-language-support/code-i18n/#plurals
  5. This MySQL uft8 collations comparison may help you: http://mysql.rjweb.org/utf8_collations.html Took it from here: https://stackoverflow.com/questions/2344118/utf-8-general-bin-unicode
  6. Wouldn't it be better to do something like: $news_full = $page->children("template=news, limit={$page->feed_count_full}"); $news_archive = $page->children("template=news, limit=50")->filter("id!=$news_full"); so you can keep a reasonable limit to the archive query, 50 for instance, instead of loading all the children at once?
  7. Sergio

    Looking for a new Job

    Best of luck on the job search, Soma! I hope you find a great place soon!
  8. Hi Moritz, I see. Without seeing your _init file, I wonder why did you set the default regions there opposed to set them in _main.php or other template that's appended and not prepended? As _init.php is prepended (as set in the default PW config file) the region's content will appear on all page before they are rendered, unless you replace that region on the 404 template file (basic-page), like: //basic-page.php <div pw-replace="footerinfo"> <!-- nothing --> </div> Using the debug, I can see it at the bottom of my 404 page. See that the first line shows the region I set on _init.php (copied from yours) and it being replaced on the third line.
  9. The 404 page uses the basic-page.php template file unless you have changed it on admin. Take a look at how Ryan implemented a PW region debug on the Uikit "Regular" site profile, it may help you figure it out: <?php if(config()->debug && user()->isSuperuser()): // display region debugging info ?> <section id='debug' class='uk-section uk-section-muted'> <div class='uk-container'> <!--PW-REGION-DEBUG--> </div> </section> <?php endif; ?>
  10. Thanks, my friend! Will test and let you know!
  11. Hey, @tpr did you have the time to check out this? Thank you!
  12. I think the problem is the strpos function. It will return true for "pdf" in "report_pdf" for instance. But we need to return true only if it's an exact match. So, what about this: foreach ($ignoredTemplates as $t) { if (preg_match('/\b'.trim($t).'\b/',$templateFile->filename)) { return; } } I tested it here and it works.
  13. Hey @tpr, I think I've found a bug. One of my pages was returning a black page and no error on debug/tracy. Data was passing fine. After 10 min trying several things here, like removing the template php file to test the error etc and nothing happened. The file was named pdf_report_pdf.latte and it was loaded by another template via viewFile method. I then went back to the module config and remove a "pdf" (just "pdf) from the list of templates to ignore as I have another template called pdf.php and voilà, the error was gone. So, I'm guessing you do a regex on the ignore list entries? Was that the problem?
  14. Check your .htaccess file. It may be wrong or not existing. Check also if the /processwire path is valid. It's the name of the page of ID = 2 on the pages table on the website database.
  15. Today's setup for multi-browser / OS testing. Chrome and IE11 on Windows and Safari on the Mac. (Beer not in the frame)
  • Create New...