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
$category = $imanager->getCategory('slug=my-category-slug'); | |
// or | |
$category = $imanager->getCategory('name=My Category Name'); | |
// or | |
$category = $imanager->getCategory('position=2'); | |
// etc |
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
$categoryMapper = $imanager->getCategoryMapper(); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<div id="main-wrapper"> | |
<h1>[[page_title]]</h1> | |
<div class="content-wrapper"> | |
<div class="content"> | |
[[page_content]] | |
</div> | |
</div> | |
<div class="sidebar"> | |
[[page_sidebar]] | |
</div> |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5 template</title> | |
<link rel="stylesheet" href="<?php get_theme_url(); ?>/css/styles.css"> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> |
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
html,body { | |
margin:0; | |
padding:0; | |
border:0; | |
outline:0; | |
font-size:100%; | |
font:inherit; | |
vertical-align:baseline; | |
} |
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
$item = imanager()->getItemMapper()->init(8, 50); | |
// Accessing a field value | |
echo $item->fields->fieldname->value; |
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
$item = imanager()->getItemMapper()->init(8, 50); | |
// Accessing an item attribute | |
echo $item->name; |
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 | |
/** | |
* Class ItemSimplificator, just a simple decorator class | |
*/ | |
class ItemSimplificator | |
{ | |
protected $_item; | |
public function __construct(Item $item) { | |
$this->_item = $item; |
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
// get an item with the id 50 of the category 8 | |
$item = imanager()->getItemMapper()->init(8, 50); | |
// simplify item | |
$item = new ItemSimplificator($item); |
OlderNewer