Fix excerpts on blog posts
This commit is contained in:
parent
429c373db7
commit
ff9f0a7b0b
124 changed files with 187 additions and 604 deletions
|
|
@ -1,19 +1,16 @@
|
|||
---
|
||||
title: Include environment-specific settings files on Pantheon
|
||||
excerpt: How to load a different settings file per environment on Pantheon.
|
||||
tags:
|
||||
- drupal
|
||||
- drupal-planet
|
||||
- pantheon
|
||||
- settings.php
|
||||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
I was recently doing some work on a site hosted on [Pantheon](http://getpantheon.com) and came across an issue, for which part of the suggested fix was to ensure that the `$base_url` variable was explicitly defined within settings.php (this is also best practice on all Drupal sites).
|
||||
|
||||
The way that was recommended was by using a `switch()` function based on Pantheon's environment variable. For example:
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
```language-php
|
||||
switch ($_SERVER['PANTHEON_ENVIRONMENT']) {
|
||||
case 'dev':
|
||||
|
|
@ -81,4 +78,3 @@ $base_url = '';
|
|||
```
|
||||
|
||||
The environment specific files are also committed into Git and pushed to Pantheon, and are then included automatically on each environment.
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue