Lucas Torres

All articles by Lucas Torres
drupal 7 logo

Drupal 7: Display Unpublished nodes in a view

        Filed under: Drupal

Long story short: Not doable with the default permissions (I know it sounds crazy, but it’s true) Drupal 7 has a permission called ‘View own unpublished content’, and it works well when it comes to see the actual unpublished node, but it doesn’t work when you try to build a View with them, even if … Continued

Tagged: ,

How to hide Field Groups in Drupal 7, the right way

How to hide Field Groups in Drupal 7, the right way

        Filed under: Drupal, How to

There are times when you need to manipulate a form via hook_form_alter in Drupal, and you may need to hide/show fields depending on some criteria. You can hide a single field using something like $form[‘field_name’][‘#type’] = ‘hidden’;. But, what if you’re using the ‘field_group’ module and you want to hide a whole group? Well, you … Continued

Tagged: ,

How to modify a WordPress query the right way

        Filed under: WordPress

If you’re a developer, and have worked with WordPress, you should be familiar with something called “The Loop“. The Loop is the way WordPress handles the display of the content you create. Behind The Loop, there are the Wp_Query class, and the $wp_query object. That way WordPress decides what to output based on the page … Continued



drupal 7 logo

How to Get URL Parameters in Drupal 7

        Filed under: Agile development, Drupal, How to

I’ve seen the horror! (allow me some drama here) I’ve seen code in Drupal projects, trying to get parameters from URLs in this way: $params = $_GET; or $some_var = $_GET[‘some_var’] Drupal has some functions to deal with parameters coming from a URL. Now, let me be honest, it’s not more secure if you use … Continued

Tagged: , ,



Continuous Deployment for Drupal 7 (part 2)

        Filed under: Drupal, How to, Web Development

  Hi again! If you haven’t read the first part of this article, then you might want to give a look at Continuous Deployment for Drupal 7 (part 1) before moving onto this one. If you already read it, then great! Let’s continue then. At this point you know that to implement your continuous deployment workflow for … Continued

Tagged: ,

Drupal 7 logo on a blue background

Continuous Deployment for Drupal 7 (part 1)

        Filed under: Drupal, How to, Web Development

  Working with a CMS such as WordPress or Drupal makes life easier for Web Developers, but once you want to start doing things the right way, a bunch of terms fall into your mind, such as: package managers, development environments, APIs, continuous integration, continuous development, etc. And you start wondering: how can I do this while … Continued

Tagged: , ,