Prefill a block editor from a selection of templates
Objectives:
- Create a new module with a
template
field - Prefill the block editor for new items according to the selected template
Requirements:
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
sass = require('gulp-sass'), | |
csso = require('gulp-csso'), | |
uglify = require('gulp-uglify'), | |
jade = require('gulp-jade'), | |
concat = require('gulp-concat'), | |
livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei | |
tinylr = require('tiny-lr'), | |
express = require('express'), |
Sub Export4KPowerpoint() | |
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then | |
ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\export.mp4", _ | |
UseTimingsAndNarrations:=True, _ | |
VertResolution:=2160, _ | |
FramesPerSecond:=30, _ | |
Quality:=100 | |
Else: MsgBox "There is another conversion to video in progress" | |
End If | |
End Sub |
<?php | |
class ProcessWireValetDriver extends BasicValetDriver | |
{ | |
private $possibleDirectories = [ | |
'', // PW in root, do not remove except you're sure you never use it | |
'/dist', | |
'/public' | |
]; |
Objectives:
template
fieldRequirements:
By default Twill will disply the url of a module item to be {siteurl}/{module}/{slug}
e.g. mysite.com/pages/about. With the 'about' section being the editable slug. This is understandable as Twill knows nothing of your frontend routing. However it is likely confusing for editors, as that url presented will not be the final url of the content.
This will give us more correct urls e.g. mysite.com/about
// app/Http/Controllers/Admin/PageController
protected $permalinkBase = '';
# Salvar num arquivo ~/encode.sh, conceder direito de execução e | |
# executar desta forma (adaptar nomes de diretórios e arquivos para seu caso): | |
# $ ~/encode.sh ~/Video/bigFile.mp4 ~/Video/smallFile.mp4 | |
ffmpeg -i "$1" -vcodec h264 -acodec aac "$2" |