Video related these slide of my WordCamp Nederland 2016 talk can be found there http://wordpress.tv/2016/10/29/jaime-martinez-enhance-your-wordpress-development-with-twig-and-clarkson/
Here at Level Level we created an Open Source Twig based plugin ‘Clarkson Core’: a template engine with under the hood a collection of Object-oriented WordPress classes and some lightweight handy features.
This, in combination with a basic modern starter-theme and some agreed upon guidelines, contributes to a workflow that keeps comprehensive projects aligned with our technical goals. Meanwhile keeping the WordPress way of development in mind.
Currently every new project runs upon the Clarkson stack resulting in a variety of already delivered websites like Autotaalglas, Elsevier.nl, Kansfonds, SOMO and more. Our goals were to deliver maintainable, high quality and stable code that kept running after every automated deployment without having to hold our breath.
27. {% include 'defaults/head.twig' %}
<main class="main">
{% block content %}
{% include 'partials/content.twig' %}
{% endblock %}
</main>
<sidebar>
{% block sidebar %}
{% include 'partials/sidebar.twig' %}
{% endblock %}
</sidebar>
{% include 'defaults/footer.twig' %}
Set up a layout file (layouts/2-columns.twig)
28. {% extend 'layouts/2-columns.twig' %}
{% block content %}
{% include 'post/content.twig' %}
{# Or some other custom HTML #}
{% endblock %}
Extend this layout file [single.twig]
29. Autotaalglas live! Jaime’s talk on WCNL 2016
Prefix - Level Level
WCNL JAIME
This is a link and this is regular text
30. Autotaalglas live! Jaime’s talk on WCNL 2016
Prefix - Level Level
WCNL JAIME
This is a link and this is regular text
46. class post extends Clarkson_Post {
public function get_grid_size(){
return get_post_meta( $this->get_id(), 'll-grid-size');
}
}
themes/wcnl2016/wordpress-objects/post.php
47. class ll_partner_post extends post {
public function get_title() {
$title = parent::get_title();
$title ="Prefix - " . $title;
return $title;
}
}
themes/wcnl2016/wordpress-objects/ll-partner-post.php