This file contains hidden or 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
/* | |
From Marty Walker Pastie | |
Picturefill markup with ProcessWire image sizing | |
https://github.com/scottjehl/picturefill/ | |
http://processwire.com/ | |
*/ | |
<div data-picture data-alt='{$page->title}'> | |
<div data-src='{$image->size(50,0)->url}'></div> |
This file contains hidden or 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 just blew my mind | |
// | |
//User has field 'userPages'[Pagefield type], where administrator added parts of whole tree avail. to user. | |
//This checks whether current page (wrapped in object) or any of its parents was added to this 'userPages' | |
//(thus current page or anything higher in the hierarchy gives user the access) | |
//wow. | |
$access = | |
count( |
This file contains hidden or 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
jQuery.fn.highlight = function () { | |
$(this).each(function () { | |
var el = $(this); | |
$("<div/>") | |
.width(el.outerWidth()) | |
.height(el.outerHeight()) | |
.css({ | |
"position": "absolute", | |
"left": el.offset().left, | |
"top": el.offset().top, |
This file contains hidden or 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
if($page->parent->isHidden()) { | |
foreach($page->parents as $parent) | |
if($parent->viewable()) echo "<li><a href='{$parent->url}'>{$parent->title}</a></li>"; | |
} |
This file contains hidden or 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
// above opening HTML tag | |
function flourish_loader( $class_name ) | |
{ | |
// Customize this to your root Flourish directory | |
$flourish_root = wire('config')->paths->root . 'site/.flourish/'; | |
$file = $flourish_root . $class_name . '.php'; | |
if (file_exists($file)) { | |
include $file; | |
} |
NewerOlder