I wanted to get a VM configured quickly for building Craft sites, this is what I did:
https://puphpet.com/#deploy-target
I want a local VM working with Vagrant + VirtualBox.
| {# For this, I wanted the nav to show the top-level node and second-level nodes #} | |
| {# when on level 1, and then show the second-level and its children when on #} | |
| {# level 2 or level 3 (so we get good parent, child, and sibling navigation. #} | |
| {# Requires string 'sectionName' to be passed with Structure section name #} | |
| {% if entry.showLeftNavigation %} | |
| <nav class="interior-page__nav"> |
I wanted to get a VM configured quickly for building Craft sites, this is what I did:
https://puphpet.com/#deploy-target
I want a local VM working with Vagrant + VirtualBox.
"Medium traffic" = able to handle around 50 concurrent users on average.
If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).
Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
| # coding: utf-8 | |
| # Copyright (c) 2013 Mountainstorm | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
| From the command line | |
| $ touch your/path/to/expressionengine/cache/.gitkeep | |
| In your .gitignore file | |
| your/path/to/expressionengine/cache/* | |
| !your/path/to/expressionengine/cache/.gitkeep |
| <?php | |
| public function sessions_end($session) | |
| { | |
| if ($session->userdata['can_access_cp'] === 'y') { | |
| $new_global_vars['gv_can_preview'] = TRUE; | |
| } else { | |
| $new_global_vars['gv_can_preview'] = FALSE; | |
| } |