Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
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
| // Originally from: https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486 | |
| Duration = | |
| // Duration formatting | |
| // * @konstatinos 1/25/2016 | |
| // * Given a number of seconds, returns a format of "hh:mm:ss" | |
| // | |
| // We start with a duration in number of seconds | |
| VAR Duration = [Change this value to the name of your column that contains your seconds value] | |
| // There are 3,600 seconds in an hour | |
| VAR Hours = |
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
| /*! | |
| * tableToD3Chart(); | |
| * Author: Joe Watkins - joe@emergeinteractive.com | |
| * | |
| * Scrape the dom for data and create C3/D3 based charts | |
| * | |
| * Defaults: | |
| * chartTitleWrapper = the element wrapping text for chart label | |
| * chartType = line, pie, donut, bar, spline, scatter etc. - see C3 docs | |
| * useDom = true/false - if you don't want to scrape dom and want to define data use false |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| // This will execute the exp:tag if first segment is empty | |
| {if segment_1 != ''} | |
| {exp:class:method} | |
| {if var == "foo"} | |
| Lorem | |
| {if:else} | |
| Ipsum | |
| {/if} | |
| {/exp:class:method} |
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
| ################################################################################# | |
| # | |
| # - ExpressionEngine index.php ModRewrite Removal - | |
| # compatible with Google Analytics Tracking | |
| # | |
| ################################################################################## | |
| RewriteEngine on |