How to programitcally call a view using exposed filter was discussed earlier. But if you want to pass a date field to the view's exposed filter form, you have to change your code a little bit. If you want to know how, you may read on.
In this article we will be explaining how to use hook_views_query_alter() for Drupal views. While working on Views, I came across a problem. In my search option there is a drop-down menu listing taxonomy terms, what I have to do is instead of taxonomy terms I need to give two options and taxonomy terms comes as a subset of these two terms.
Blocks in Drupal can be assigned to regions in specified pages. Two options which are already in Drupal 7's block configuration page are:
- All pages except those listed
- Only the listed pages
And if you have enabled the PHP filter module, you may find another option:
- Pages on which this PHP code returns TRUE (experts only)
In this article,I am going to explain to you, how you can display a block on pages based on the value returned by PHP code.
Coupons are used to redeem discounts while purchasing products from a store. They are mainly used for sales promotion. Here we are considering a coupon to be set for our products in our Drupal / Ubercart store so as to enable us to provide rebate or financial discounts for our products. Coupons can be set for products as a product feature. These coupons will be emailed to the user after the checkout.
We were requested by a client to post the published content automatically on Facebook wall. For publishing a content from our Drupal site to Facebook wall, need to create a Facebook app .If you want to know how to post a published content to Facebook wall in Drupal 7 then continue reading.
Social media sites like twitter and facebook are key tools in reaching out to large audiences almost real time. The key part about using these systems is their ability to broadcast real time news and updates. Tweeting content from a Drupal site as soon as a node / content is posted on the site is a good way to use Twitter. If you want to know how to post a published content on twitter in Drupal 7 then continue reading
Drupal 6 will be maintained till the release of Drupal 8. Drupal 8 release is expected to happen towards the end of 2013. The current stable branch Drupal 7 will be maintained till the release of Drupal 9 (probably 2015). If you are running a production site on Drupal 6 then you will probably have to start looking at upgrading the site by the end of this year.
Upgrading Drupal 6 to Drupal 7 is supposed to be a straightforward process but there are certain things you have to be careful about when you upgrade Drupal. The following list outlines the different steps you will have to follow to upgrade your non-mission-critical small Drupal site.
It is very good if we can create a pure CSS multilevel drop-down menu in Drupal. We can simply avoid adding additional modules or jQuery for the multilevel drop-down menus. As we had a requirement to create a multilevel drop-down menu without using jQuery, we created it in pure css. And it works well in different browsers.
We created this menu as main menu for the header navigation part. And there is a region for the header part called "region-header" and it wrapped in a class called .header-wrapper. Also Drupal provides a class called 'menu' for ul. So we had to define the class-name along with the ul.
With Drupal 8 in the works a lot of Drupal 6 sites are currently upgrading to Drupal 7. We get quite a few queries on Drupal upgrades and almost everybody asks for a fixed price estimate for the process. In theory Drupal 6 to Drupal 7 upgrade process is an automated process and all you have to do is to take the site through a set of standard steps for the upgrade. However upgrades don't always work like that.
In one of our recent projects we had to show a slider for a price range. The slider was to be used to show all products with prices between a minimum and a maximum. If we set filters in they will be shown as text boxes. For our project the client requirement was to show a slider above these text-boxes. See the screenshot. The JQuery UI has a good slider widget which will gives the graphical version of these range. We can use this widget with our views 'in between' clause.
Drupal Views provides pagination options. However at a glance the number of items shown in a page seems to be limited. However there is a way to change the number of times shown in a Views page dynamically. If you want to know how to change the number of items displayed in a Drupal Views pager number dynamically then continue reading.
On a recent Drupal project we had developed, we had to use the Drupal date module to display the date in a popup in a custom form. However we noticed that a date description was appearing on the form. If you are facing the same situation in your Drupal site then read on to know how to remove the default date format option added by the date module.
Boost is a Drupal module which provides static page caching for anonymous users. Boost caches a page when a user first visits a page and the the succeeding users are given the cached version of the page. The biggest advantage of Boost is that it works well in shared hosting environments and it provides fresh content for logged in users. Read on to know how to configure Boost in a Drupal 7 website.
If you are a Drupal developer you must have noticed that there is very little information on the web regarding how to create a custom token in a Drupal site. We needed to create a custom token for one of our Drupal clients. If you are facing a similar situation in your Drupal site and would like to know how to create a custom token in your Drupal 7 site and set a custom value for it then read on to know the complete solution
Most Drupal developers know about writing theme functions in Drupal 7. Likewise we can create theme templates too. However Drupal developers rarely create their own templates. Read on to know how to create a custom template in Drupal 7.
Triggers and Events are very important concept in the Drupal world. If you want to get your hands dirty tweaking Drupal or dive into Drupal development or simply configure a Drupal website properly you need to be familiar with the Drupal Actions and Triggers. If you want to know more about Drupal Triggers and Actions then read on to find out.
We had discussed about the basics of Drupal Actions and Triggers in our previous article. Have a look at the article How to create Drupal Triggers and Actions - Part I if you have not done so. In this article we are going to show you how to define Actions and Triggers in code.
In Drupal 7 Image module offers an image field which makes available an image widget for file fields that can be added to content types. This will allow for upload of images to the image field which can then later be processed by the image module and be presented using the different image styles as configured. This means that image module should have the ability to process files uploaded using this field.
A Drupal user using running a Drupal website in another language encountered a situation where the Double-quote (“) character is retained in the URL aliases generated by the Drupal Pathauto module. If you happen to be running a Drupal website in a language other than English and encountering such characters in the alias generated by the Drupal Pathauto module then proceed down below to know the solution.