Original idea from: https://github.com/pixelandtonic/craftnet
.env
DEV_MODE_SECRET="my-password"
SITE_URL_EN="@web" | |
SITE_URL_DE="@web/de" |
Original idea from: https://github.com/pixelandtonic/craftnet
.env
DEV_MODE_SECRET="my-password"
<?php | |
namespace modules; | |
use Craft; | |
use craft\elements\Asset; | |
use yii\base\Event; | |
use yii\base\ModelEvent; | |
class Module extends \yii\base\Module |
<?php | |
namespace modules; | |
use Craft; | |
use craft\elements\Entry; | |
use craft\events\ModelEvent; | |
use DateTime; | |
use yii\base\Event; |
<?php | |
namespace modules; | |
use Craft; | |
class Module extends \yii\base\Module | |
{ | |
/** | |
* Initializes the module. |
{% extends '_layouts/standard' %} | |
{% set cacheContentBlock = true %} | |
{% block content %} | |
{# ...content worth caching #} | |
{% endblock %} |
<?php | |
namespace Craft; | |
class BusinessLogicVariable | |
{ | |
public function getRequestedLocaleId() | |
{ | |
// Return the current locale ID if any path is requested | |
if (craft()->request->getUrl() !== '/') { | |
return craft()->locale->id; |
import qs from 'qs'; | |
import Axios from 'axios'; | |
Axios.defaults.baseURL = Craft.baseUrl; | |
Axios.defaults.headers.common['Accept'] = 'application/json'; | |
Axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; | |
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; | |
Axios.interceptors.request.use(config => { | |
if (config.data instanceof FormData) { |
#!/bin/bash | |
BASE_PATH="./" | |
R0=(craft-assetmetadata v2 v3) | |
R1=(craft-elementstats v1 v2) | |
R2=(craft-footnotes v1 v2) | |
R3=(craft-maintenance v2 v3) | |
for i in {0..10} | |
do |