Lire la version française Today, I encountered an “issue” when using numeric variable as key in a Twig array. This is a very specific problem which is due to the use of the array_merge php function. The documentation tells that … Continue reading → The post Use variable as key in a Twig array appeared first on Obtao.
This is a work-in-progress, so hopefully the next time you visit this page you'll get to see more stuff. Twiggy Spark Official Twig Website Current version: 0.8.5 Overview Twiggy is not just a simple implementation of Twig template engine for CodeIgniter. It supports themes, layouts, templates for regular apps and also for apps that use HMVC (module support). It is supposed to make life easier for
Twig tips, tricks, advanced stuff and new and noteworthy features.
4日目の@mkkn_infoさんのFuelphpのエラーハンドリングがなんか今ひとつ物足りなかったのでなんとかしてみた話 - どうにもならない日々@mkknに引き続き、FuelPHP Advent Calendar 2013の5日目です。 ここ数年はアドベントカレンダーの時にしか技術的な内容を書いていない気がするのが恐ろしいところですが、気にせずいきましょう。 FuelPHPのParserパッケージ FuelPHPは、基本的にはビューに生のPHPスクリプトを使うことになっていますが、標準バンドルされているParserパッケージを用いることで、様々なテンプレートエンジンを用いることができます。現在サポートされているエンジンは以下の通り。 Twig Mustache MarkDown Dwoo Jade Haml MtHaml Smarty PHPTAL このうち自分ではTwigを愛用していま
Symfony1 had a helper function called auto_link_text(), which parsed a block of text and wrapped all text URLs in <a> tags, automatically populating the href attribute. Does Twig include a function like this? I've looked on Google, and gone through the code, but can't find one. I can obviously code one myself, but don't want to replicate something if it's already there. If I do code one myself, sh
PHP Static Site Generator Sculpin is a static site generator written in PHP. It converts Markdown files, Twig templates and standard HTML into a static HTML site that can be easily deployed. Why Sculpin? PHP 7 static site generator. Fast and easy to get started. If your language of choice is PHP, you'll feel right at home if you need to extend Sculpin. Composer-based installation. Forget about man
Build themes faster and easier using this WordPress Library from Upstatement featuring the Twig Template Language and Express-style routing SensioLab's Twig Template Engine gives you a simple interface to WordPress's intense power. What does it look like? (Part 2) Timber doesn’t change the appearance of your theme. You control it by creating classes and assigning styles. It’s like buying a chainsa
2013-07-31 Laravel4 さわってみた 最近ナウいと噂の Laravel を使ってみたのでメモ。 まとめ CakePHP っぽくかける Silex コアな部分はだいたい Symfony コンポーネント 日本じゃまだあまり使われてないのかネットサーフィンしても情報少ない なら Cake で書くわ install composer create-project laravel/laravel [project_name] routing <?php Route::get('/', function() { return "Hello, World!"; }); Route::get('/post', 'PostContoller@getIndex'); Route::get('/post/:id', 'PostController@getPost'); Route::post('
Symfony Advent Calendar JP 2011 : ATND 9日目の記事です。 Symfony2.0.7が昨日リリースされましたね。今回のアップデートで個人的に熱かったのはSymfony2にバンドルされるTwigのバージョンがv1.1.2からv1.4.0へアップグレードされた所です。Twigは便利な機能もいっぱいありますのでこの機会に紹介したいと思います。 for お馴染みのループに使う構文です。一般的な使い方はこうです。 <ul> {% for item in article %} <li>{{ item.title }}</li> {% endfor %} </ul> もちろん配列の添字にもアクセスできます。 <ul> {% for key, item in article %} <li>{{ key }}:{{ item.title }}</li> {% endfo
あけましておめでとうございます。小川です。 本日はTwigでカスタムタグを追加する方法を紹介します。 ■Twig TwigはPHPで実装されたテンプレートエンジンの1つで、Python製のテンプレートエンジンのJinjaとほぼ同じ構文を持っています。 Webアプリケーションフレームワークsymfonyの次期バージョンでもあるSymfony2で採用されることが決定しており、Symfony界隈を中心に注目を浴びているテンプレートエンジンです。 <h1>Categories</h1> {% if categories|length > 0 %} <ul> {% for category in categories %} <li>{{ category.name }}</li> {% endfor %} </ul> {% endif %} 上記がTwigを使ったサンプルコードです。「{% %}」や
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く