this bit goes in development.services.yml
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
parameters:
twig.config:
debug: true
auto_reload: null
cache: false
#!/bin/bash | |
#MongoDB startup script with status and proper lockfile removing | |
#Version 1.0.1 20-nov-2011 Rene Bakx ([email protected]) | |
#Created on OS-X 10.7 but should work on other versions | |
if [ -z $1 ] ; then | |
echo "Usage: $0 [start|stop|restart|status] " | |
exit 1 |
<?php | |
// build from drupal_get_query_parameters(); | |
$filterQuery = array('news', 'blog', 'article'); | |
// build query | |
$query = new EntityFieldQuery(); | |
$query->entityCondition('entity_type', 'node'); | |
$query->propertyCondition('type', 'page'); | |
$query->propertyCondition('status', 1); | |
$query->fieldCondition('field_page_type', 'value', $filterQuery, 'in'); | |
$query->propertyOrderBy('title', 'ASC'); |
#!/bin/sh | |
# | |
# chkconfig: 35 99 99 | |
# description: prerender.js server for the given user | |
# | |
. /etc/rc.d/init.d/functions | |
APPNAME="Prerender" |
{# If creating a responsive theme, you sometimes need to duplicate content in a template and a macro can be an option but sometimes the overhead is to much #} | |
{% set loginblock %} | |
<li><a href="{{ url('login') }}">Log in</a></li> | |
<li><a href="{{ url('signup') }}">Sign up</a></li> | |
{% endset %} | |
... more html... | |
<ul class="nav nav-secondary"> |
{% for index,rawdata in view.result %} | |
{% set row_date = rawdata.field_field_conference_date[0]['raw']['value'] %} | |
{% set upcoming = false %} | |
{% set recent = false %} | |
{% if date(row_date) > date() %} | |
{% if not upcoming %} | |
<small>{{ 'Upcoming'|t }}</small> | |
{% set upcoming = true %} | |
{% endif %} | |
{% else %} |
export PHP7=1; // on opening your terminal | |
// Goes in your ~/.bash_profile | |
if [ -z "$PHP7" ]; then | |
export DRUSH_PHP='/Applications/MAMP/bin/php/php7.0.0/bin/php' | |
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php7.0.0/bin/:~/bin:$JAVA_HOME/bin:$PATH | |
else | |
export DRUSH_PHP='/Applications/MAMP/bin/php/php5.5.26/bin/php' | |
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php5.5.26/bin/:~/bin:$JAVA_HOME/bin:$PATH | |
fi |
this bit goes in development.services.yml
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
parameters:
twig.config:
debug: true
auto_reload: null
cache: false
router.yml :
simple_twitter.ajax_controller_get_tweets:
path: '_simple_twitter/tweets/{name}/{number}'
defaults:
_controller: '\Drupal\simple_twitter\Controller\AjaxController::getTweetsForUserAction'
_title: 'getTweetsForUser'
requirements:
{% macro split_title(text) %} | |
{% set text = render(text) %} {# only when doing twig for drupal 7 #} | |
{% set chunks = text|split('~') %} | |
{% for chunk in chunks %} | |
{{ (loop.index0 is odd)?"<em>"~chunk~"</em>":chunk}} | |
{% endfor %} | |
{% endmacro %} | |
<h3>{{ split_title('This is a ~text~ with some ~colors~') }}</h3> |
name: Cruftless | |
type: theme | |
description: Cruftless is Stable without libraries | |
package: BadIdeas | |
core: 8.x | |
base theme: false | |
regions: | |
header: Header | |
content: Content | |
footer: Footer |