Upload
themccallister
View
223
Download
1
Embed Size (px)
DESCRIPTION
My presentation at San Diego PHP meetup group for April 2014.
Citation preview
Lets talk about Craft!
Presented by Jason McCallister
No, no - not that kind of Craft….
this kind…
intro• Developed by Pixel & Tonic (pixelandtonic.com
)
• Makers of popular ExpressionEngine add-ons Playa, Matrix and more.
• Version 2.0 was released on April 1st
• Built on Yii (http://www.yiiframework.com/)
• Twig Template Engine (http://twig.sensiolabs.org/)
a few features• One-click updating
• Live Preview
• Matrix
• Responsive Control Panel
• Sections and Channels
• Entry types
different..• Built completely around your content -
assumes zero about your website and content (no required files or templates - or even fields!)
• Support on Google Plus and via email directly from the developers
• Element Types
element types
“File systems manages files. iPhoto manages photos. iTunes manages media. Blogging systems manage entries. And content management systems manage… “content”. But what is “content”? Historically it has meant “entries…”
http://pixelandtonic.com/blog/craft-element-types
element types“While other content management systems are busy managing entries, Craft manages elements. Everything in Craft – your site’s users, assets, categories, tags, globals, even Matrix blocks, and of course, entries – they’re all elements. That’s why everything is so consistent in Craft. It’s not that entries and users both individually have custom field support, it’s that they share the same system-wide custom field support that’s available to all elements. Same with relations, and a slew of other things.”
http://pixelandtonic.com/blog/craft-element-types
element types“…People expect more and more out of their websites. Even “simple” content-only sites aren’t so simple anymore. It’s not just about entries having custom fields; it’s about custom fields everywhere – on assets, users, categories, tags, even custom fields within custom fields (a la Matrix). We’ve been at the forefront of the custom field craze at P&T – our FieldFrame for ExpressionEngine ignited it…”
http://www.producthunt.co/posts/2526
craft/config/db.php’server' => 'localhost',
'user' => ‘awesome_squirrel',
'password' => ‘Sup3rSEcritP@$$‘,
'database' => 'myAwesomeCoolDB',
/** only required configuration for installation */
craft/config/general.php
‘omitScriptNameInUrls' => true,
'cpTrigger' => ‘the-cloud’,
'siteUrl' => ‘http://domainname.com‘,
'fileSystemPath' => ‘/path/to/folder’,
'devMode' => true,
/** more http://buildwithcraft.com/docs/config-settings */
multi-env general.php
return array(
’*' => array(
'omitScriptNameInUrls' => true,
'cpTrigger' => ‘secretAgentMan'
),
'mydevwebsite.local' => array(
'devMode' => true,
'environmentVariables' => array(
'siteUrl' => 'http://mydevwebsite.local',
'fileSystemPath' => ‘/path/to/mydevwebsite.local’
)
),
multi-env db.phpreturn array(
'*' => array(
'tablePrefix' => 'prefix',
),
‘domain.local' => array(
'server' => 'localhost',
'user' => 'user',
'password' => 'password',
'database' => 'dbnamegoeshere',
),
‘domain.com' => array(
'server' => getenv('DBHOST'),
'user' => getenv('DBUSER'),
'password' => getenv('DBPASS'),
'database' => getenv('DBNAME'),
)),
twiggy, twig, twig…
OMG UNICORNS!“..its like a magical walk down candy lane with
unicorns…”
resourcesStraight Up Craft
http://straightupcraft.com
Craft Cookbook
http://craftcookbook.net/
exit;the boring part is now over….
thank you!
Jason McCallister
http://themccallister.com
or
@theMcCallister