Remove duplicate content from posts
This commit is contained in:
parent
4f281e4b88
commit
c5b6d51e37
|
@ -15,10 +15,6 @@ I have previously seen it done this way by adding this into in a node.tpl.php fi
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Today, I had a situation where I was displaying a list of teasers for news article nodes. The article content type had several different fields assigned to it, including main and thumbnail images. In this case, I wanted to have different output and fields displayed when a teaser was displayed compared to when a complete node was displayed.
|
||||
|
||||
I have previously seen it done this way by adding this into in a node.tpl.php file:
|
||||
|
||||
```language-php
|
||||
if ($teaser) {
|
||||
// The teaser output.
|
||||
|
|
|
@ -14,10 +14,6 @@ Rather than delete these files or change the file permissions manually for each
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
When you download [Drupal](http://drupal.org/project/drupal), there are several text files that are placed in the root of your installation. You don't want or need these to be visible to anyone attempting to view them in a browser - especially `CHANGELOG.txt` as that includes the exact version of Drupal you are running and could therefore have security implications.
|
||||
|
||||
Rather than delete these files or change the file permissions manually for each file, I can add the following lines into my VirtualHost configuration:
|
||||
|
||||
```language-apacheconf
|
||||
<Files ~ "\.txt$">
|
||||
Order deny,allow
|
||||
|
|
|
@ -10,16 +10,12 @@ tags:
|
|||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
If you use a lot of process and preprocess functions within your Drupal theme, then your template.php can get very long and it can become difficult to find a certain piece of code.
|
||||
|
||||
Following the example of the [Omega theme](http://drupal.org/project/omega "The Omega theme on Drupal.org"), I've started separating my process and preprocess functions into their own files. For example, mytheme_preprocess_node can be placed within a preprocess/node.inc file, and mytheme_process_page can be placed within process/page.inc.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
If you use a lot of process and preprocess functions within your Drupal theme, then your template.php can get very long and it can become difficult to find a certain piece of code. Following the example of the [Omega theme](http://drupal.org/project/omega "The Omega theme on Drupal.org"), I've started separating my process and preprocess functions into their own files. For example, mytheme_preprocess_node can be placed within a preprocess/node.inc file, and mytheme_process_page can be placed within process/page.inc.
|
||||
|
||||
The first step is to use the default mytheme_process() and mytheme_preprocess() functions to utilise my custom function. So within my template.php file:
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
```language-php
|
||||
<?php
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ After a busy few days, I've released two new contrib Drupal modules.
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
After a busy few days, I've released two new contrib Drupal modules:
|
||||
|
||||
* [Block Aria Landmark Roles](http://drupal.org/project/block_aria_landmark_roles) - Inspired by [Block Class](http://drupal.org/project/block_class), this module adds additional elements to the block configuration forms that allow users to assign a ARIA landmark role to a block.
|
||||
* [Nomensa Accessible Media Player](http://drupal.org/project/nomensa_amp) - Provides integration with Nomensa's [Accessible Media Player](https://github.com/nomensa/Accessible-Media-Player).
|
||||
|
||||
|
|
|
@ -15,8 +15,6 @@ This week I released the first version of the Nomensa Accessible Media Player mo
|
|||
{% block content %}
|
||||
*The official documentation for this module is now located at <https://www.drupal.org/node/2383447>. This post was accurate at the time of writing, whereas the documentation page will be kept up to date with any future changes.*
|
||||
|
||||
This week I released the first version of the Nomensa Accessible Media Player module for Drupal 7. Here's some instructions of how to install and configure it.
|
||||
|
||||
## Initial configuration
|
||||
|
||||
### Download the Library
|
||||
|
|
|
@ -15,7 +15,7 @@ I'm absolutely delighted to announce that I'm going to be writing an article for
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I'm absolutely delighted to announce that I'm going to be writing an article for [Linux Journal](http://www.linuxjournal.com) magazine's upcoming Drupal special. The article is going to be entitled "Speeding Up Your Drupal Development Using Installation Profiles and Distributions" and will be mentioning existing distributions available on Drupal.org, but mainly focussing on the steps needed to create your own custom distribution. Needless to say, I'm quite excited about it!
|
||||
The article is going to be entitled "Speeding Up Your Drupal Development Using Installation Profiles and Distributions" and will be mentioning existing distributions available on Drupal.org, but mainly focussing on the steps needed to create your own custom distribution. Needless to say, I'm quite excited about it!
|
||||
|
||||
The article is expected to be published in October.
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,8 +15,6 @@ For reference, this is the code needed to display a menu in a Drupal 7 template
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
For reference, this is the code needed to display a menu in a Drupal 7 template file, including the navigation ARIA role.
|
||||
|
||||
```language-php
|
||||
$menu_name = 'menu-footer-menu';
|
||||
$menu_id = 'footer-menu';
|
||||
|
|
|
@ -11,8 +11,6 @@ Yesterday evening I went along and spoke at the [UnifiedDiff meetup](http://www.
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Yesterday evening I went along and spoke at the [UnifiedDiff meetup](http://www.unifieddiff.co.uk) in Cardiff, having offered previously to do a presentation providing an introduction to Drupal.
|
||||
|
||||
I'm an experienced Drupal Developer, but not an experienced public speaker (although I have done several user training sessions and Drupal demonstrations for clients previously), and I think that some of the nerves that I had beforehand were apparent during the presentation, and being the first speaker for the evening probably didn't help, although I did get a [nice tweet](https://twitter.com/craigmarvelley/status/243418608720543745) mid-way through.
|
||||
|
||||
Initially, after aiming for a 20-minute presentation plus Q&A, I think I wrapped up the presentation in around 14 minutes, although I did about 6 minutes of answering questions afterwards including the apparently mandatory "Why use Drupal compared to WordPress or Joomla?" question, some Drupal 8 and Symfony questions, as well as an interesting question about the White House development project after I'd listed it within a list of example sites. Next time, I think that some more detailed presenter notes are needed. Typically, as soon as it sat back in my seat, the majority of things that I'd managed to remember beforehand all came flooding back to me and I thought "I should have said that whilst I was up speaking".
|
||||
|
|
|
@ -12,8 +12,6 @@ These preferences ensure that the code is compliant with [Drupal coding standard
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
[Sublime Text 2](http://www.sublimetext.com/2) has been my text editor of choice for the past few months, and I use it at home, in work, and on any virtual machines that I run. So rather than having to manually re-enter my settings each time, I thought that I'd document them here for future reference. These preferences ensure that the code is compliant with [Drupal coding standards](http://drupal.org/coding-standards "Drupal coding standards on Drupal.org") - using two spaces instead of a tab, no trailing whitespace, blank line at the end of a file etc.
|
||||
|
||||
## Preferences
|
||||
|
||||
These can be changed by going to Preferences > Settings - User.
|
||||
|
|
|
@ -8,13 +8,11 @@ tags:
|
|||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
I'm happy to announce that the [Accessible Bristol](http://www.accessiblebristol.org.uk) website was launched this week, on Drupal 7.
|
||||
|
||||
The site has been developed over the past few months, and uses the [User Relationships](http://drupal.org/project/user_relationships) and [Privatemsg](http://drupal.org/project/privatemsg) modules to provide a community-based platform where people with an interest in accessibility can register and network with each other.
|
||||
I'm happy to announce that the [Accessible Bristol](http://www.accessiblebristol.org.uk) website was launched this week, on Drupal 7. The site has been developed over the past few months, and uses the [User Relationships](http://drupal.org/project/user_relationships) and [Privatemsg](http://drupal.org/project/privatemsg) modules to provide a community-based platform where people with an interest in accessibility can register and network with each other.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I'm happy to announce that the [Accessible Bristol](http://www.accessiblebristol.org.uk) website was launched this week, on Drupal 7. The site has been developed over the past few months, and uses the [User Relationships](http://drupal.org/project/user_relationships) and [Privatemsg](http://drupal.org/project/privatemsg) modules to provide a community-based platform where people with an interest in accessibility can register and network with each other.
|
||||
The site has been developed over the past few months, and uses the [User Relationships](http://drupal.org/project/user_relationships) and [Privatemsg](http://drupal.org/project/privatemsg) modules to provide a community-based platform where people with an interest in accessibility can register and network with each other.
|
||||
|
||||
The group is hosting a launch event on the 28th November at the Council House, College Green, Bristol. Interested? More information is available at <http://www.accessiblebristol.org.uk/events/accessible-bristol-launch> or go to <http://buytickets.at/accessiblebristol/6434> to register.
|
||||
{% endblock %}
|
||||
|
|
|
@ -17,8 +17,6 @@ I've recently started using [SASS](http://sass-lang.com) rather than LESS to do
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I've recently started using [SASS](http://sass-lang.com) rather than LESS to do my CSS preprocessing - namely due to its integration with [Compass](http://compass-style.org) and it's built-in CSS3 mixins. There are three modules that provide the ability to use SASS within Drupal:
|
||||
|
||||
* [Sassy](http://drupal.org/project/sassy "Sassy module on drupal.org")
|
||||
* [Prepro](http://drupal.org/project/prepro "Prepro module on drupal.org")
|
||||
* [Libraries API](http://drupal.org/project/libraries "Libraries API module on drupal.org")
|
||||
|
|
|
@ -15,8 +15,6 @@ I see this regularly when working on Drupal sites when someone wants to check wh
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I see this regularly when working on Drupal sites when someone wants to check whether the current user is logged in to Drupal (authenticated) or not (anonymous):
|
||||
|
||||
```language-php
|
||||
global $user;
|
||||
if ($user->uid) {
|
||||
|
|
|
@ -13,8 +13,6 @@ This post outlines the steps required to create your own custom tokens in Drupal
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
This post outlines the steps required to create your own custom tokens in Drupal.
|
||||
|
||||
When writing the recent releases of the [Copyright Block](http://drupal.org/project/copyright_block) module, I used tokens to allow the user to edit and customise their copyright message and place the copyright_message:dates token in the desired position. When the block is rendered, the token is replaced by the necessary dates.
|
||||
|
||||
We will be using the fictional *foo* module to demonstrate this.
|
||||
|
|
|
@ -12,7 +12,7 @@ After reading numerous blog posts about how to install [Sublime Text 2](http://w
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
After reading numerous blog posts about how to install [Sublime Text 2](http://www.sublimetext.com/2 "Sublime Text 2") in [Ubuntu](http://www.ubuntu.com/2 "Ubuntu"), this is definitely the quickest way! Just paste the following lines into your Terminal:
|
||||
Just paste the following lines into your Terminal:
|
||||
|
||||
```language-bash
|
||||
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2
|
||||
|
|
|
@ -12,8 +12,6 @@ Yesterday was my last day working at [Nomensa](http://www.nomensa.com "Nomensa")
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Yesterday was my last day working at [Nomensa](http://www.nomensa.com "Nomensa"). Next week, I'll be starting as a Senior Developer at [Precedent](http://www.precedent.co.uk "Precedent").
|
||||
|
||||
The last 14 months that I've been working at Nomensa have been absolutely fantastic, and had allowed me to work on some great projects for great clients - mainly [unionlearn](http://www.unionlearn.org "unionlearn") and [Digital Theatre Plus](http://www.digitaltheatreplus.com "Digital Theatre Plus"). I've learned so much about accessibility and web standards, and have pretty much changed my whole approach to front-end development to accommodate best practices. I've also been involved with the Drupal Accessibility group since starting at Nomensa, and have written several accessibility-focused Drupal modules, including the [Nomensa Accessible Media Player](http://drupal.org/project/nomensa_amp "The Nomensa Accessible Media Player Drupal module") module and the [Accessibility Checklist](http://drupal.org/project/a11y_checklist "The accessibility checklist for Drupal"). I'll definitely be continuing my interest in accessibility, championing best practices, and incorporating it into my future work wherever possible.
|
||||
|
||||
With that all said, I'm really looking forward to starting my new role at Precedent, tackling some new challenges, and I'm sure that it'll be as great a place to work as Nomensa was.
|
||||
|
|
|
@ -10,11 +10,11 @@ tags:
|
|||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
Whilst watching [Drupalize.me](http://drupalize.me "Drupalize.me")'s recent [Introduction to Git series](http://drupalize.me/series/introduction-git-series "Introduction to Git on Drupalize.me"), I thought it was useful the way that the current Git branch or tag name was displayed in the bash prompt. Here's how to do it.
|
||||
Whilst watching [Drupalize.me](http://drupalize.me "Drupalize.me")'s recent [Introduction to Git series](http://drupalize.me/series/introduction-git-series "Introduction to Git on Drupalize.me"), I thought it was useful the way that the current Git branch or tag name was displayed in the bash prompt.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Whilst watching [Drupalize.me](http://drupalize.me "Drupalize.me")'s recent [Introduction to Git series](http://drupalize.me/series/introduction-git-series "Introduction to Git on Drupalize.me"), I thought it was useful the way that the current Git branch or tag name was displayed in the bash prompt.
|
||||
Here's how to do it.
|
||||
|
||||
For example (with some slight modifications):
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ Here are some useful links that I've found when researching about unit testing i
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here are some useful links that I've found when researching about unit testing in Drupal using SimpleTest:
|
||||
|
||||
* [An Introduction to Unit Testing in Drupal](http://www.lullabot.com/blog/articles/introduction-unit-testing-drupal "An Introduction to Unit Testing in Drupal")
|
||||
* [Module Developer's Guide to SimpleTest](http://www.lullabot.com/blog/articles/drupal-module-developers-guide-simpletest "Module Developer's Guide to SimpleTest")
|
||||
* [SimpleTest Tutorial (Drupal 6)](https://drupal.org/simpletest-tutorial "SimpleTest Tutorial (Drupal 6)")
|
||||
|
|
|
@ -12,14 +12,10 @@ use: [posts]
|
|||
{% block excerpt %}
|
||||
The [Domain Access project](https://drupal.org/project/domain "The Domain Access project on Drupal.org") is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The issue is that the domains are stored within the database so these are copied across when the data is migrated between environments, whereas the domains are obviously going to change.
|
||||
|
||||
Rather than changing the domain settings within the Domain module itself, the best solution I think is to use table prefixes and create a different domain table per environment.
|
||||
Rather than changing the domain settings within the Domain module itself, the best solution I think is to use table prefixes and create a different domain table per environment. With a live, staging and local domains, the tables would be named as follows:
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
The [Domain Access project](https://drupal.org/project/domain "The Domain Access project on Drupal.org") is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The issue is that the domains are stored within the database so these are copied across when the data is migrated between environments, whereas the domains are obviously going to change.
|
||||
|
||||
Rather than changing the domain settings within the Domain module itself, the best solution I think is to use table prefixes and create a different domain table per environment. With a live, staging and local domains, the tables would be named as follows:
|
||||
|
||||
```language-bash
|
||||
live_domain
|
||||
local_domain
|
||||
|
|
|
@ -11,8 +11,6 @@ use: [posts]
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
[Precedent](http://www.precedent.co.uk) are sending myself and two of our other Drupal Developers to [Drupalcon Prague](http://prague2013.drupal.org).
|
||||
|
||||
Having wanted to attend the last few Drupalcons (London, especially) but not being able to, I'm definitely looking forward to this one.
|
||||
|
||||
See you there!
|
||||
|
|
|
@ -13,10 +13,6 @@ To bootstrap Drupal, you would need to add some additional lines of code to the
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
There are times when doing Drupal development when you need to run a custom PHP script, maybe moving data from one field to another, that doesn't warrant the time and effort to create a custom module. In this scenario, it would be quicker to write a .php script and bootstrap Drupal to gain access to functions like `node_load()` and `db_query()`.
|
||||
|
||||
To bootstrap Drupal, you would need to add some additional lines of code to the stop of your script. Something like:
|
||||
|
||||
```language-php
|
||||
<?php
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ use: [posts]
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
[Vagrant](http://www.vagrantup.com "About Vagrant") is a tool for managing virtual machines within [VirtualBox](https://www.virtualbox.org) from the command line. Here are some useful commands to know when using Vagrant:
|
||||
|
||||
Command | Description
|
||||
:-|:-
|
||||
vagrant init {box} | Initialise a new VM in the current working directory. Specify a box name, or "base" will be used by default.
|
||||
|
|
|
@ -13,10 +13,6 @@ You can save time and typing by running the two commands on one line:
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Testing a patch file is usually a two-step process. First you download the patch file from the source, and then you run a separate command to apply it.
|
||||
|
||||
You can save time and typing by running the two commands on one line:
|
||||
|
||||
```language-bash
|
||||
$ curl http://drupal.org/files/[patch-name].patch | git apply -v
|
||||
```
|
||||
|
|
|
@ -9,7 +9,7 @@ Here are some bash aliases that I use and find helpful for quickly writing Git a
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here are some bash aliases that I use and find helpful for quickly writing Git and Git Flow commands. These should be placed within your `~/.bashrc` or `~/.bash_profile` file:
|
||||
These should be placed within your `~/.bashrc` or `~/.bash_profile` file:
|
||||
|
||||
```language-bash
|
||||
alias gi="git init"
|
||||
|
|
|
@ -13,8 +13,6 @@ It's all booked, I'm going to be attending [DrupalCamp London](http://2014.drupa
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
It's all booked, I'm going to be attending [DrupalCamp London](http://2014.drupalcamplondon.co.uk) this year, my first DrupalCamp!
|
||||
|
||||
I'm going as a volunteer, so I'm going to be helping with the registrations on the Saturday morning and for another couple hours elsewhere over the weekend. I've also offered to help organise and oversee some code sprints, although I'm definitely wanting to do some sprinting of my own and attend a few sessions.
|
||||
|
||||
I'm looking forward to meeting some new people as well as catching up with some people that I met at [DrupalCon Prague](http://prague2013.drupal.org).
|
||||
|
|
|
@ -15,8 +15,6 @@ Here are my slides from my "What is Git Flow?" session at [DrupalCamp London](ht
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here are my slides from my "What is Git Flow?" session at [DrupalCamp London](http://2014.drupalcamplondon.co.uk).
|
||||
|
||||
{% include 'speakerdeck' with { data_id: '201559e0f103013198dd5a5f6f23ab67' } %}
|
||||
|
||||
## Take aways
|
||||
|
|
|
@ -10,8 +10,6 @@ Today was my last day working at [Precedent](http://www.precedent.com). Next wee
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Today was my last day working at [Precedent](http://www.precedent.com). Next week, I'll be starting my [new job](https://assoc.drupal.org/node/18923 "Drupal.org Developer") at the [Drupal Association](http://assoc.drupal.org) working on Drupal's home - [Drupal.org](http://www.drupal.org).
|
||||
|
||||
I was at Precedent for just over a year and had the opportunity to work on several Drupal projects from project leading to ad-hoc module and theme development, including my largest Drupal build to date.
|
||||
|
||||
I was also lucky enough to go to [DrupalCon Prague](http://prague2013.drupal.org) as well as [DrupalCamp London](http://2014.drupalcamplondon.co.uk).
|
||||
|
|
|
@ -6,10 +6,4 @@ tags:
|
|||
- personal
|
||||
use: [posts]
|
||||
---
|
||||
{% block excerpt %}
|
||||
This is just a quick post to thank everyone for their comments and congratulations after my previous post about [joining the Drupal Association](/blog/drupal-association/). I’m looking forward to my first day in the job tomorrow.
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
This is just a quick post to thank everyone for their comments and congratulations after my previous post about [joining the Drupal Association](/blog/drupal-association/). I’m looking forward to my first day in the job tomorrow.
|
||||
{% endblock %}
|
||||
|
|
|
@ -13,7 +13,5 @@ Here are my slides from this month's talk night at the [Drupal Bristol user grou
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here are my slides from this month's talk night at the [Drupal Bristol user group](https://groups.drupal.org/bristol-and-west-uk).
|
||||
|
||||
{% include 'speakerdeck' with { data_id: '42605700f102013198de5a5f6f23ab67' } %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,12 +15,8 @@ Here are the steps that I took to fix this and point Vagrant back at the correct
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
A few times recently, I've had instances where [Vagrant](https://www.vagrantup.com) seems to have forgotten which virtual machine it's supposed to load, probably due to renaming a project directory or the .vagrant directory being moved accidentally.
|
||||
|
||||
Here are the steps that I took to fix this and point Vagrant back at the correct VM.
|
||||
|
||||
1. Stop the machine from running using the `$ vagrant halt` command.
|
||||
2. Use the `$ VBoxManage list vms` command to view a list of the virtual machines on your system. Note the ID of the correct VM that should be loading. For example, `"foo_default_1405481857614_74478" {e492bfc3-cac2-4cde-a396-e81e37e421e2}`. The number within the curly brackets is the ID of the virtual machine.
|
||||
3. Within the .vagrant directory in your project (it is hidden by default), update the ID within the machines/default/virtualbox/id file.
|
||||
4. Start the new VM with `$ vagrant up`.
|
||||
1. Use the `$ VBoxManage list vms` command to view a list of the virtual machines on your system. Note the ID of the correct VM that should be loading. For example, `"foo_default_1405481857614_74478" {e492bfc3-cac2-4cde-a396-e81e37e421e2}`. The number within the curly brackets is the ID of the virtual machine.
|
||||
1. Within the .vagrant directory in your project (it is hidden by default), update the ID within the machines/default/virtualbox/id file.
|
||||
1. Start the new VM with `$ vagrant up`.
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,9 +15,6 @@ If you re-create a feature through the UI, you'll be prompted to download a new
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
If you use the [Features module](http://drupal.org/project/features) to manage your Drupal configuration, it can be time consuming to update features through the UI, especially if you are working on a remote server and need to keep downloading and uploading files.
|
||||
|
||||
If you re-create a feature through the UI, you'll be prompted to download a new archive of the feature in its entirety onto your local computer. You could either commit this into a local repository and then pull it remotely, or use a tool such as SCP to upload the archive onto the server and commit it from there. You can simplify this process by using [Drush](http://drush.org).
|
||||
## Finding Components
|
||||
|
||||
To search for a component, use the `drush features-components` command. This will display a list of all components on the site. As we're only interested in components that haven't been exported yet, add the `--not-exported` option to filter the results.
|
||||
|
|
|
@ -11,8 +11,6 @@ How to install and configure the [Stage File Proxy](https://www.drupal.org/proje
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Download the [Stage File Proxy](https://www.drupal.org/project/stage_file_proxy) module from Drupal.org and enable it on your site.
|
||||
|
||||
As this module is only going to be needed on pre-production sites, it would be better to configure this within your settings.php or settings.local.php file. We do this using the `$conf` array which removes the need to configure the module through the UI and store the values in the database.
|
||||
|
||||
```language-php
|
||||
|
|
|
@ -15,10 +15,6 @@ The way that was recommended was by using a `switch()` function based on Pantheo
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
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:
|
||||
|
||||
```language-php
|
||||
switch ($_SERVER['PANTHEON_ENVIRONMENT']) {
|
||||
case 'dev':
|
||||
|
|
|
@ -14,8 +14,6 @@ use: [posts]
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
[Reroute Email](https://www.drupal.org/project/reroute_email) module uses `hook_mail_alter()` to prevent emails from being sent to users from non-production sites. It allows you to enter one or more email addresses that will receive the emails instead of delivering them to the original user.
|
||||
|
||||
> This is useful in case where you do not want email sent from a Drupal site to reach the users. For example, if you copy a live site to a test site for the purpose of development, and you do not want any email sent to real users of the original site. Or you want to check the emails sent for uniform formatting, footers, ...etc.
|
||||
|
||||
As we don't need the module configured on production (we don't need to reroute any emails there), it's best to do this in code using settings.local.php (if you have one) or the standard settings.php file.
|
||||
|
|
|
@ -13,8 +13,6 @@ A lot happened in 2014. Here are some of the main things that I'd like to highli
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
A lot happened in 2014. Here are some of the main things that I'd like to highlight:
|
||||
|
||||
## Joined the Drupal Association
|
||||
|
||||
This was the main thing for me this year, in May I left [Precedent](http://precedent.com) and joined the [Drupal Association](https://assoc.drupal.org). I work on the Engineering team, focused mainly on [Drupal.org](https://www.drupal.org) but I've also done some theming work on the DrupalCon [Amsterdam](http://amsterdam2014.drupal.org) and [Latin America](http://latinamerica2015.drupal.org) websites, and some pre-launch work on [Drupal Jobs](https://jobs.drupal.org).
|
||||
|
|
|
@ -16,8 +16,6 @@ Here’s a list of resources that I compiled whilst preparing for my [Sculpin an
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Here’s a list of resources that I compiled whilst preparing for my [Sculpin and Twig talk](http://drupalcampnorth.org/session/test-drive-twig-sculpin) at [DrupalCamp North](http://drupalcampnorth.org).
|
||||
|
||||
## General Information
|
||||
|
||||
* <https://sculpin.io>
|
||||
|
|
|
@ -16,10 +16,6 @@ Here are the steps that I took to be able to load, render and embed the form.
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
I recently had my first experience using the [Entityform module](https://www.drupal.org/project/entityform) in a project. It was quite easy to configure with different form types, but then I needed to embed the form into an overlay. I was expecting to use the `drupal_get_form()` function and render it, but this didn’t work.
|
||||
|
||||
Here are the steps that I took to be able to load, render and embed the form.
|
||||
|
||||
## Loading the Form
|
||||
|
||||
The first thing that I needed to do to render the form was to load an empty instance of the entityform using `entityform_empty_load()`. In this example, `newsletter` is the name of my form type.
|
||||
|
|
|
@ -13,8 +13,6 @@ For the past few weeks I’ve been working on a personal side project, based on
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
For the past few weeks I’ve been working on a personal side project, based on Drupal VM. It’s called the [Drupal VM Generator][1], and over the weekend I’ve added the final features and fixed the remaining issues, and tagged the 1.0.0 release.
|
||||
|
||||
![](/assets/images/blog/drupalvm-generate-repo.png)
|
||||
|
||||
## What is Drupal VM?
|
||||
|
|
Reference in a new issue