Jump to content

fliwire

Members
  • Posts

    66
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

fliwire's Achievements

Full Member

Full Member (4/6)

24

Reputation

  1. Those who need it can use this for now. create .prettierrc file { "overrides": [ { "files": ["*.latte"], "options": { "parser": "html", "tabWidth": 4 } } ] }
  2. How format .latte files in vs code ? Currently there is no formatter for "latte".
  3. 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.
  4. 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'); } } }
  5. <?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, ]); }); ?>
  6. 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>
  7. you can set password and other settings in config.php WireMailSmtp/WireMailSmtpConfig.php at master · horst-n/WireMailSmtp · GitHub $config->wiremailsmtp = [ "smtp_password" => "test", ];
  8. hotwire, unpoly doesnt require any backend language. mostly use with pw: Unpoly: Unobtrusive JavaScript framework
  9. 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; } });
  10. https://developers.google.com/search/docs/advanced/robots/create-robots-txt
  11. 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.
  12. SameSite cookies explained (web.dev) u need https and set SameSite = "None"; $config->sessionCookieSameSite = "None";
  13. u can use unpoly. Layers - Unpoly <a href="/post-page" up-layer="new" up-target='.content'>Open Content</a>
×
×
  • Create New...