Tips and Tricks

May 01. 2019 · by Helge Sverre
Using Asset Rev to cachebust assets compiled with Laravel Mix in CraftCMS

Cache busting is telling the browser to refetch assets because they have changed, caching assets allows the browser to retain a file "in memory" without having to download it each time it visits your website, making the page load faster, however if you have done some changes to the styling or logic in your JS, you want to "bust the cache" so the browser gets the new updated files.

Apr 01. 2019 · by Helge Sverre
Team Workflow with Project Config in Craft CMS 3

In Craft CMS 3.1 the long awaited project config feature was added, which, when an administrative setting (channel is added, field is created or updated, assigned to a section, or plugin installed) is updated, the project.yaml file in the config folder will store the change, you can then "sync" those changes to the production database when deploying your changes, here is how our team utilize this feature.

Feb 23. 2019 · by Helge Sverre
Active menu links in CraftCMS with Twig macros and more

Learn how to mark your navigation links with an active class in Craft CMS using Twig macros and various other methods.

Feb 01. 2019 · by Helge Sverre
Connect to databases on Laravel Forge on your local machine

If you're using Laravel Forge as your hosting and provisioning tool, you might come across instances where you need to connect to a remote database via a kocal GUI tool like Sequel Pro or HeidiSQL, but Forge by default only allows SSH connections, here is how to get around it.

Jan 30. 2019 · by Helge Sverre
How to disable Craft CMS updates

Depending on your own and your team's workflow, disabling the ability for clients and developers to update the CMS and plugins in a production environment might be a smart thing to do to simplifiy your deployment strategy, here is how.

Jun 20. 2018 · by Helge Sverre
How to add custom fields to your entry list in Craft CMS

If you click the little gear icon in the entry listing page in your control panel, you can pick which fields to display value of for each item in the list, by default the title and date is shown, but if you have images or another short field that would be nice to see in the list, you can add it.

Jun 11. 2018 · by Helge Sverre
Leveraging Browser Caching on Nginx

Simple trick to make your Google Pagespeed, Pingdom Tool and GTMetrix score a little bit higher by getting an A on the "Leverage Browser Caching" grade in Nginx (Laravel Forge in my case)

Jun 10. 2018 · by Helge Sverre
How to use Ngrok with CraftCMS

Ngrok is a tool that I and other developers use to create temporary links that route traffic into your local webserver, however out-of-the-box there are some issues when using ngrok with CraftCMS due to how url and asset paths are generated.