This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- meta tags --> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="bootstrap.min.css" rel="stylesheet"> | |
<!-- Rendering of colums below not work with min + Respond 1.4, works fine with Respond 1.3 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Categories</h1> | |
{% block catlist %} | |
<ul> | |
{% foreach categories as cat %} | |
<li> | |
<a href="{{baseurl}}categories/{{cat.friendlyurl}}">{{cat.name}}</a> | |
{% if cat.data.subcategories.total > 0 %} | |
{% with categories=cat.data.subcategories %} | |
{% insert 'categories.html' 'catlist' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is just a sample model file. You can (and should) delete this once you start developing your app. | |
* @package Model | |
* @subpackage Example | |
*/ | |
/** | |
* Documentation of cached fields and the data object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Template system example --> | |
Fans of {{band.name}}: | |
{% foreach band.data.bigfans as fan %} | |
{{fan.name}} is a big fan!<br/> | |
{% elsefor %} | |
{{band.name}} has no big fans. :( | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Template system example --> | |
My favorite band is {{user.data.myfavorite.name}}<br/> | |
<br/> | |
Others who like this band are:<br/> | |
{% foreach user.data.myfavorite.data.bigfans as fan %} | |
{% if user.id != fan.id %}{{fan.name}} is a big fan!<br/>{% endif %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->zajlib->json(array('status'=>'ok')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** This will display an alert message and highlight the fields by adding the has-error class to each. */ | |
$this->zajlib->json(array( | |
'status'=>'error', | |
'message'=>'An optional message that will be displayed to the user.', | |
'highlight'=>array('name','email') | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Field definition for dates. | |
* @package Fields | |
* @subpackage BuiltinFields | |
**/ | |
zajLib::me()->load->file('/fields/text.field.php'); | |
class zajfield_email extends zajfield_text { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Validate data automatically for a single field 'email' in the model FormSignup | |
$this->zajlib->form->validate('FormSignup', 'email', 'Invalid email address specified!'); |