Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.
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
$this->EE->load->driver('channel_data'); | |
$entries = $this->EE->channel_data->get_channel_entries($channel_id); | |
foreach($entries->row() as $row) | |
{ | |
$member = $this->EE->channel_data->get_member_entries($row->author_id); | |
$data_map = array( | |
'landscapes_1' => array( |
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 | |
$passwords = array( | |
'somepassword', | |
'anotherpassword', | |
'onemorepassword' | |
// so on and so forth (don't forget the trailing commas) | |
); | |
// convert passwords to SHA1 hashes |
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
{exp:channel:entries} | |
{if member_group==1} | |
<a href="{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}">EDIT</a> | |
{/if} | |
{/exp:channel:entries} |
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
#!/bin/sh | |
# Import a remote database into a local database | |
# ---------------------------------------------- | |
# | |
# Based on http://danherd.net/quick-script-synchronise-from-a-remote-expressionengine-database/ | |
# | |
# Don’t forget chmod +x to make the script executable. | |
# | |
# Change the extension to .command to run the script directly from OS X Finder. |
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
{exp:stash:set_list name="directory" parse_tags="yes"} | |
{exp:channel:entries channel="profile" disable="categories|category_fields|profile_data|pagination" status="open" limit="200"} | |
{stash:company}{profile_company}{/stash:company} | |
{stash:first_name}{profile_first_name}{/stash:first_name} | |
{stash:last_name}{profile_last_name}{/stash:last_name} | |
{stash:title}{profile_title}{/stash:title} | |
{stash:address}{profile_address}{/stash:address} | |
{stash:address2}{profile_address2}{/stash:address2} |
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
Quotes can be damaging if read from the wrong state of mind. Some of us forget a whole life of successes can not be wrapped into one sentence. Life is not always so easily repeated. |
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
# http://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This small step-by-step guide assumes you already have Package Control installed in ST3.
If not please see Package Control Installation to install Package Control and then Usage: Install Package to learn how to install packages.
- First install Craft-Twig from Package Control.
- Then install Sublime Project Specific Syntax from Package Control.
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
# Maintainer: Zach Hoffman <zach@zrhoffman.net> | |
pkgname=docksal | |
pkgver=1.13.1 | |
pkgrel=1 | |
epoch=1 | |
pkgdesc='All-purpose web-development environment based on Docker and Docker Compose.' | |
arch=('any') | |
url='https://docksal.io/' | |
license=('MIT') |