Virgülle ayrılmış birden fazla etiket, aralarında mantıksal VE (AND) olarak değerlendirilir. Noktalı virgül, mantıksal VEYA (OR) olarak kabul edilir. AND, OR üzerinde önceliğe sahiptir ve mantıksal gruplama için parantez kullanılamaz. Bir etiketteki yıldız (*) işareti, "herhangi bir dize" anlamında bir joker karakterdir.
Bölümler: Döküman / Cotonti Geliştirme / Uzantılar
Çoğu Cotonti betiği, tarihsel olarak bu şekilde inşa edildiği için global kapsamda çalışır. Bazı değişkenler, kodun birçok yerinde yaygın olarak görülebilir. Bu makale, en önemli global değişkenleri kapsar.
Not: Bu kılavuz, tema geliştiricileri için de faydalıdır. Bu global değişkenleri global şablon etiketleri olarak da kullanabilirsiniz. Tek yapmanız gereken, CoTemplate sözdizimini hatırlamaktır. Örneğin, bir şablonda
$usr['profile']['user_avatar']
değişkeni şu şekilde kullanılır:...
Bölümler: Documentation / Extending Cotonti / Extensions
A hook is an entry point within a script where plugins can be executed to modify script's behavior. You can also treat it as an event which can be handled by third-party code. Cotonti literally includes PHP files registered as handlers for a specific hook. Imagine a script that has a hook in it:
$foo = 'The Lord of Foo'; $bar = 'hit the bar!'; // ... // A HOOK is here // ... echo "$foo $bar";
Then consider there is a handler for that hook which can access any variables...
Bölümler: Documentation / Extending Cotonti / Extensions
Most Cotonti scripts run in the global scope as it is historically built this way. Some variables are common enough to be seen in many places around the code. This article covers the most important globals.
Note: this guide comes handy for theme developers as well. You can use any of these global variables as global template tags as well. Just remember the CoTemplate syntax. E.g. $usr['profile']['user_avatar'] in a template becomes {PHP.usr.profile.user_avatar}.
There are some...