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
<nav id="primary"> | |
{{ url:anchor | |
segments='/' | |
title='<span class="icon"></span><span class="text">Home</span><span class="arrow"></span>' | |
class='home {{ if { url:segments segment="1" } == "" }} active {{ endif }}' }} | |
{{ url:anchor | |
segments='newspaper' | |
title='<span class="icon"></span><span class="text">Newspaper</span><span class="arrow"></span>' | |
class='newspaper {{ if { url:segments segment="1" } == "newspaper" }} active {{ endif }}' }} |
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
1. What I'd like to do, but doesn't work | |
<a href="{{ url:site uri="faq/{{ url:segments segment="1" default="" }}" }}"> | |
2. My "solution" which feels kinda hacky: | |
<a href="{{ url:site }}faq/{{ url:segments segment="1" default="" }}"> |
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
Entering this into WYSIWYG: | |
{{ files:listing folder="6" }} | |
<a class="fancybox" | |
href="{{ files:image_path id='{{ id }}' }}" | |
rel="group" | |
style="background-image:url( {{ url:site }}files/thumb/{{ id }}/150/150 )"> | |
</a> | |
{{ /files:listing }} |
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
Current | |
$('.slides').anystretch("<img width="2000" height="620" src="http://samu.ca/wp-content/uploads/2012/11/samu_header-1_mini.jpg" class="attachment-slider-img wp-post-image" alt="samu_header-1_mini" title="samu_header-1_mini" />"); | |
Fixed | |
$('.slides').anystretch('<img width="2000" height="620" src="http://samu.ca/wp-content/uploads/2012/11/samu_header-1_mini.jpg" class="attachment-slider-img wp-post-image" alt="samu_header-1_mini" title="samu_header-1_mini" />'); |
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::set_partial([ | |
['header', 'partials/frontend/header'], | |
['footer', 'partials/frontend/footer'], | |
['categories', 'partials/frontend/widgets/categories/tree', ['tree' => Categories::tree()]], | |
]); |
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
class Businesses_m extends MY_Model { | |
function get_by_name($name) | |
{ | |
return $this->db->select('*') | |
->from('businesses') | |
->join('locations', 'locations.business_id = businesses.id') | |
->where('name', $name) | |
->get() | |
->result(); | |
} |
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
// Routes.php | |
use Guzzle\Http\Client; | |
use Guzzle\Plugin\Oauth\OauthPlugin; | |
Route::get('/', function() | |
{ | |
$client = new Client('http://api.twitter.com/1.1'); | |
$oauth = new OauthPlugin(array( | |
'consumer_key' => '-', |
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
Route::get('/', function() | |
{ | |
$tweets = Cache::remember('tweets', 5, function() { | |
$client = new Client('http://api.twitter.com/1.1'); | |
$oauth = new OauthPlugin([ | |
'consumer_key' => '*', | |
'consumer_secret' => '*', | |
'token' => '*', | |
'token_secret' => '*' | |
]); |
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
// Stored in textarea in page via Page Types (any Lex tag in here has the same result) | |
{{ button:generate class="btn-primary btn-large" href="#" icon="icon-mobile-phone" icon-large="true" full-width="true" text="Available on the App Store" }} | |
// In layout file | |
{{ if product_links }} | |
<div class="well">{{ product_links }}</div> | |
{{ endif }} | |
// Result | |
Parse error: syntax error, unexpected 'null' (T_STRING) |
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
while ($dir && ($file = readdir($dir)) !== false) { | |
if ($file != "." && $file != ".." && $file != ".DS_Store") { | |
} | |
} |
OlderNewer