Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/2023 in all areas

  1. I am as many others love ❤️the Latte template engine, and I use RockFrontend to integrate it into ProcessWire. One cool feature of Latte is, that you can easily create a comma-separated (or any other separator) list of items, where the last item does not have a separator (comma) afterwards, without needing PHP. Take this code as an example {foreach $pages->get('/myparentpage')->children as $item} {$item->title|noescape}{sep}, {/sep} {/foreach} Which will output a list like: first title, second title, third title If you want to know more use cases take a look at the documentation at https://latte.nette.org/en/tags#toc-first-last-sep
    2 points
  2. You could do that with latte also like so: {$pages->get('/')->children->each('title') | join(', ')}
    1 point
  3. I think you can do shorter. ? With Twig I would do that: {{ pages.get('/').children.each('title') | join(', ') }} But usually I use html lists so WireArray API is enough: <ul>{{ pages.get('/').children.each('<li>{title}</li>') }}</ul>
    1 point
  4. Hi @bernhard, Yes, I can confirm that fixes the issue. Thanks! Ian.
    1 point
  5. Some reporter had the incredible chance to capture a team of developers successfully completing a full WordPress update. A very rare and intense footage: (reading your messages, this is how I imagine WordPress ? )
    1 point
  6. Well, best practice would be to make sure that your api request times out before your PHP script does (WireHttp::setTimeout / curl_setopt(CURLOPT_TIMEOUT, xx) / curl_setopt(CURLOPT_CONNECTTIMEOUT, yy) vs. max_execution_time & site_time_limit). You can of course set the header through .htaccess instead of PHP (mod_headers must be enabled of course): Header always set Access-Control-Allow-Origin: "*" The keyword "always" also sends the header with redirects.
    1 point
  7. i have a string as follows $content='<h2>asdfgjklöä</h2>Familienname xName'; and i want replace xName but i cannot find any function. Is there a way like c# replace?
    1 point
  8. Table Tools plugin is another possibility, but you have to purchase it. Another point to mention is that it could be confusing for customers. My experience is that the more possibilities you offer the more problems customers will have. I always tend to make it as simple as possible (ASAP). Dont offer to much settings or possibilities - every additional setting is often a challenge for them. But for better experienced users it will be a very useful plugin to create really complex tables in a quick way. So you have to decide depending on the pros and cons.
    1 point
×
×
  • Create New...