fliwire
Members-
Posts
70 -
Joined
-
Last visited
-
Days Won
1
fliwire last won the day on September 16
fliwire had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
fliwire's Achievements
Full Member (4/6)
33
Reputation
-
addSuffix loads class if filename ends with suffix. processwire/wire/core/ProcessWire.php at 3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7 · processwire/processwire (github.com) my setup. changed default "classes" dir with "models".
-
@TomPich // suffix is Repository not Repo. $classLoader->addSuffix("Repository", __DIR__ . '/classes/Repository');
-
<?php // site/init.php namespace ProcessWire; if (!defined("PROCESSWIRE")) die(); $classLoader = $wire->classLoader; $classLoader->addSuffix("Service", __DIR__ . '/services'); $classLoader->addSuffix("Form", __DIR__ . '/forms'); $classLoader->addNamespace("ProcessWire", __DIR__ . '/utils');
-
Unable to process order payment due to session change
fliwire replied to Spinbox's topic in Padloper Support
session issue. add site/config.php $config->sessionCookieSameSite = "None"; and make sure site is https. -
Those who need it can use this for now. create .prettierrc file { "overrides": [ { "files": ["*.latte"], "options": { "parser": "html", "tabWidth": 4 } } ] }
-
How format .latte files in vs code ? Currently there is no formatter for "latte".
-
Same issue: $collections->sync_queue("product={$product}, limit=1"); // this not work in hook $collections->sync_queue->find("product={$product}, limit=1"); // this works if pagination limit not enabled in settings.
-
My access to support form expired. sync_queue is a "ProFields: Table field". Version: Table 0.2.3 // ready.php $wire->addHookBefore( "Pages::saveReady(template=collection)", function (HookEvent $event) { $page = $event->arguments(0); if ($page->sync_add) { $collections = pages()->get("template=collections"); $collections->of(false); foreach ($page->children() as $key => $product) { $queue = $collections->sync_queue("product={$product}, limit=1"); // always give 1 count can't check if already added. if (!$queue->count) { $q = $collections->sync_queue->makeBlankItem(); $q->product = $product; $q->date = time(); $collections->sync_queue->add($q); $collections->save('sync_queue'); } } // This works $home = pages("/"); $http = new WireHttp(); $response = $http->post($home->httpUrl, [ "collection" => $page->id, "sync_add" => $page->sync_add, ]); } $page->sync_add = 0; $event->removeHook(null); } ); // home.php $collection = input("post", "collection", "int"); $sync_add = input("post", "sync_add", "int"); $collection = pages()->get("template=collection, id={$collection}"); if ($collection->id && $sync_add) { $products = $collection->children(); $collections = pages()->get("template=collections"); $collections->of(false); foreach ($products as $key => $product) { // Only add product one time $queue = $collections->sync_queue("product={$product}, limit=1"); // this works as expected if (!$queue->count) { $q = $collections->sync_queue->makeBlankItem(); $q->product = $product; $q->date = time(); $collections->sync_queue->add($q); $collections->save('sync_queue'); } } }
-
<?php $home = pages("/"); echo cache()->get('offcanvas-nav', 10, function() { return ukNav($home->and($home->children), [ 'depth' => 2, 'accordion' => false, 'type' => 'default', 'class' => '', // 'blockParents' => [ 'blog' ], 'repeatParent' => true, 'noNavQty' => 20, 'maxItems' => 16, 'divider' => false, ]); }); ?>
-
install it via composer and than how init latte? tried breadcrumbs code not working? <ul> <li n:foreach="$page->parents()->add($page) as $item"> <a href="{$item->url}" n:tag-if="$item->id != $page->id"> {$item->title} </a> </li> </ul>
-
you can set password and other settings in config.php WireMailSmtp/WireMailSmtpConfig.php at master · horst-n/WireMailSmtp · GitHub $config->wiremailsmtp = [ "smtp_password" => "test", ];
-
hotwire, unpoly doesnt require any backend language. mostly use with pw: Unpoly: Unobtrusive JavaScript framework
-
delete " - site name" from module settings and add "site name" if not home page. $wire->addHookAfter('SeoMaestro::renderSeoDataValue', function (HookEvent $event) use ($settings) { $group = $event->arguments(0); $name = $event->arguments(1); $value = $event->arguments(2); $page = wire("page"); if ($page->id != 1 && $group === 'meta' && $name === 'title') { $event->return = $value . ' - ' . $settings->site_name; } });
-
https://developers.google.com/search/docs/advanced/robots/create-robots-txt
-
make sure u have latest master version 3.0.184. sessionCookieSameSite added 3.0.178 ProcessWire Weekly #366 or add to htaccess <ifmodule mod_headers.c> Header always edit Set-Cookie ^(.*)$ $1;SameSite=None;Secure </ifmodule> u should have no issue.