The slides for the Twig for Drupal 7 introduction talk I gave at FrontendUnited in Amsterdam.
No hardcore coding, just examples why Twig is for HTML was SASS is for your CSS.
Twig for Drupal 8 and PHP | Presented at OC Drupalwebbywe
A high level overview of Twig and its functions that was presented at the OC Drupal meetup in February 2014 at KWALL.
As Twig is now part of Drupal 8 core, it is still being developed so slides are mostly on Twig itself. Discussion was over what Twig provides to themers.
http://www.meetup.com/oc-php
http://www.meetup.com/ocdrupal/
TWIG: the flexible, fast and secure template language for PHPCesare D'Amico
TWIG is a template engine created by Fabien Potencier, the father of Symfony. In this talk you'll learn why he wrote it, its main features and strengths.
Twig for Drupal 8 and PHP | Presented at OC Drupalwebbywe
A high level overview of Twig and its functions that was presented at the OC Drupal meetup in February 2014 at KWALL.
As Twig is now part of Drupal 8 core, it is still being developed so slides are mostly on Twig itself. Discussion was over what Twig provides to themers.
http://www.meetup.com/oc-php
http://www.meetup.com/ocdrupal/
TWIG: the flexible, fast and secure template language for PHPCesare D'Amico
TWIG is a template engine created by Fabien Potencier, the father of Symfony. In this talk you'll learn why he wrote it, its main features and strengths.
PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
YouTube Link: https://youtu.be/7GXaobCrBb4
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Python Modules' will help you understand the concept of modules in python, why and how we can use modules in python. Below are the topics covered in this PPT:
What Is A Python Module?
How To Create A Python Module?
How To Call A Python Module?
Built-in Modules In Python
Demo
Python Tutorial Playlist: https://goo.gl/WsBpKe
Blog Series: http://bit.ly/2sqmP4s
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Formazione sul theming per drupal 8: partendo da una breve panoramica di che cos'è cambiato rispetto alla versione precedente, vedremo quali sono le novità introdotte con la nuova versione ma soprattutto faremo alcuni esempi pratici utili per chi vuole iniziare a creare un tema per drupal 8 e… vivere sereno!
PHP string function helps us to manipulate string in various ways. There are various types of string function available. Here we discuss some important functions and its use with examples.
YouTube Link: https://youtu.be/7GXaobCrBb4
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Python Modules' will help you understand the concept of modules in python, why and how we can use modules in python. Below are the topics covered in this PPT:
What Is A Python Module?
How To Create A Python Module?
How To Call A Python Module?
Built-in Modules In Python
Demo
Python Tutorial Playlist: https://goo.gl/WsBpKe
Blog Series: http://bit.ly/2sqmP4s
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Little documentation and few base themes with 8.x branches - what's a front end developer to do? I'll show you what's changing in Drupal theming between D7 and D8 and how to create a custom theme based on the Classy base theme, step by step. We'll go over Twig basics and Twig debugging.
Formazione sul theming per drupal 8: partendo da una breve panoramica di che cos'è cambiato rispetto alla versione precedente, vedremo quali sono le novità introdotte con la nuova versione ma soprattutto faremo alcuni esempi pratici utili per chi vuole iniziare a creare un tema per drupal 8 e… vivere sereno!
Quite significant changes were introduced in the theme system between Drupal 8 and 7. This guide contains information that applies to Drupal 8 theming.
Обработчик шаблонов Twig обретает все большую популярность среди разработчиков. Он поддерживается практически всеми современными PHP фреймверками: Drupal, Symfony, Zend Framework, YII, CodeIgniter, CakePHP. Так за что разработчики любят Twig?
В докладе автор на примерах покажет простоту и гибкость Twig шаблонизатора. Далее будут рассмотрены некоторые аспекты расширения стандартного Twig функционала при помощи собственных функций, фильтров, тестов, декларирования глобальных переменных и т.д. Также будет показано внутренне устройство Twig – парсер, лексер, компилятор и создание собственного тега (то что пишется между {%..%} )
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
2. About me
René Bakx (@renebakx http://renebakx.nl)
PHP Developer since 2000
user 590180 on drupal.org
Loves open source development
Hates the default HTML output of drupal
3. About Twig
Originally created by Armin Ronacher (Also
known for Jinja, a Python template engine)
Since 2009 part of Fabien Potencier’s world
domination plan aka Symfony2
Available as standalone package under a BSD
License
4. About Twig
Twig is a very modern PHP 5 based template
engine.
It is fast! Templates are compiled into PHP
It is secure! Templates can be sandboxed, output can
be escaped.
It is extensible! You override everything if you want.
5. About Twig
Object Oriented Templates!
It is for HTML, what LESS/SASS is for CSS.
Integrates seamless into many IDEs like :
Textmate, Sublime Text, Vim, Netbeans, PHP-
Storm, Eclipse, Coda and many others.
6. Twig for Drupal
Started about 2 years ago as a spare time proof of concept
project for @zichtonline.
Because we did not like PHPTemplate and the way
output is handled in Drupal
Despite being a d.o. sandbox project, it is very much
production ready!
Twig for Drupal (TFD), enforces separation of display
and pre/post-processing logic.
8. Template logic
{# Comment #}
{{ node.title }}
{{ node.taxonomy|join(‘, ‘) }}
{% for item in node.items %}
{{ node.title }}
{% endfor %}
{% for i in range(0,3) %}
- {{ i }} -
{% endfor %}
9. Template logic
{# twig template #}
{{ node.title }}
<?php
/* Array */
$node[‘title’]
/* Object */
$node->title
$node->title()
/* Render array of doom (tm) */
$node = array(‘#theme’ => ‘theme_title’,
‘value => ‘My Title’))
Output that value of any of the following
PHP or Drupal types. Twig figures it out for
you :)
10. Template logic
{{ node.taxonomy|join(‘, ‘) }}
{{ node.taxonomy|join(‘, ‘)|title}}
{% filter upper %}
this text becomes uppercase
{% endfilter %}
Filters are use to modify variables or
output. They can be chained with a |
@see http://twig.sensiolabs.org/doc/filters/index.html
11. Template logic
{% if user.id >= 1 %}
{% for item in node.items %}
{{ node.title }}
{% endfor %}
{% endif %}
Control structures, called TAGS can be
used to control the flow of your output.
@see http://twig.sensiolabs.org/doc/tags/index.html
12. Template logic
{% for i in range(0,3) %}
- {{ i }} -
{% endfor %}
{{ random(node.taxonomy.terms }}
Functions, can be used to generate content
@see http://twig.sensiolabs.org/doc/functions/index.html
16. Template inheritance
{# page--404.tpl.twig #}
{% extends ‘page.tpl.twig’ %}
{% block page %}
<h1>#fail!</h1>
<p>Dude where’s my page?</p>
{% endblock %}
You only need to write the part that is
CHANGED. No need to duplicate code
between pages, nodes, blocks etc. etc.
17. Selective inheritance
{# page--mobile.tpl.twig #}
{% extends vars.mobi ? ‘mobile.tpl.twig’ : ‘page.tpl.twig’ %}
{% block page %}
<article>......</article>
{% endblock %}
Allows you to define one base template for
mobile and one for other pages.
Just set the $mobi in page_preprocess() and
your done.
18. Dynamic includes
{% for block in content.blocks %}
{% include ‘block_’ ~ block.name ~ '.twig.tpl' %}
{% endfor %}
{% include ‘block_’ ~ block.name|default('base') ~'.twig.tpl'
Write once, use multiple times by chunking
the parts of the code you use all over your
theme into includes instead of php
methods.
19. Dynamic includes
{% for block in content.blocks %}
{% include ‘block_’ ~ block.name ~ '.twig.tpl' %}
{% endfor %}
{% include ‘block_’ ~ block.name|default('base') ~'.twig.tpl'
Write once, use multiple times by chunking
the parts of the code you use all over your
theme into includes instead of php
methods.
20. Macros
{# macro.form.tpl.twig #}
{% macro field(name, value, type, size) %}
<input type="{{ type|default('text') }}"
name="{{ name }}"
value="{{ value|e }}"
size="{{ size|default(20) }}">
{% endmacro %}
{% import ‘macro.form.tpl.twig’ as form %}
<p> {{form.field(‘password’,null,‘password’}} </p>
Macros are not PHP functions but re-usable
pieces of view logic.
And only can read the variables passed to the
macro.
22. Installation
The easiest way is using the drush make file from
http://drupal.org/sandbox/ReneB/1528480
Or download all components yourself
(some assembling required)
Drupal http://drupal.org/download
Twig https://github.com/fabpot/Twig/
TFD http://drupal.org/sandbox/ReneB/1075966
23. Your first Twig theme
name = twiggy
description = My first twig based theme
engine = twig
core = 7.x
But I need to convert all the existing
templates for all the modules every build
including core into .twig.tpl files first!
24. Your first Twig theme
name = twiggy
description = My first twig based theme
engine = twig
core = 7.x
But I need to convert all the existing
NOPE Not needed!
templates for all the modules every build
including core into .twig.tpl files first!
25. Your first Twig theme
Drupal 7 is smart enough to detect wether
a .tpl.twig exists and if not, it renders tpl.php
You can even use a phpTemplate theme as base
theme!
name = mothertwig
description = TWIGalized version of the mothership.
engine = twig
core = 7.x
base theme = mothership
some restrictions apply @see http://drupal.org/node/225125
26. Drupal addon WITH
{% with title as title, elements sandboxed %}
<h1>{{title}}</h1>
<div> {{elements}} </div>
{% endwith %}
Join elements into a new context and remove the
others from the view. Can be very useful to
make the array of doom a bit more readable.