If you need to create a custom Search View then the Search API module is all you need to rely on. It is quite easy to create Views on search data using Search API. Read on to know how to create a custom Search View using the Search API, Views and Entity API.
Almost all the browsers have different settings for base margins and padding. It is always important to set margin and padding for the body and html tags while styling web-pages. Otherwise it might result in some inconsistencies while displaying the pages across various browsers.
We can avoid such inconsistencies by setting margins and paddings on html and body tags to 0.
The Flag module in Drupal allows you to create different flags for your website. But the default settings in flag module will only allow you to display these flags under the user-profile page (if your flag type is user), OR under node page/node teaser/in contextual links (if your flag type is node).
Normally while using Flag module, the flag name is displayed as a link. If you want to change this behaviour and replace the link with a button, you can do this easily by using CSS. You need not alter any forms for this. For this you may add the below code to your CSS.
DTD stands for Document Type Declaration. We have been using this as the header in all HTML files since the very first day we started working on HTML. But have you ever wondered what it does or what can happen if doctype is not specified? Read on to know what is DTD and how it should be implemented in a Drupal website
As a web developer, we sometimes may want to export a specific table from a MySQL database. It can be particularly helpful when we are going to apply some changes to a table that is part of a large database and we are interested in backing up that specific table only, rather that whole huge database.
To create a backup (also called dump) of the a table use this command:
A Drupal+Ubercart site with a store where users can purchase your products and no links to indicate the number of products anywhere in your site seems too annoying. It would be nice if there is a way to update the cart count as soon as a product is added to the cart.
Here is the code snippet to get the total number of contents in the cart:
Sometimes the best way to handle variable value changes on a Drupal site, would be with an admin settings form to show/edit the value. For example, while implementing a "send test mail" functionality on a Drupal site, we might want to set the recipient address at testing time. It would be easy to create an admin settings form instead of changing the addresses each time in code.
You might have come across a situation where you need to set the title of the content as the filename for an uploaded image or where you might need to replace the spaces and special characters from the filename of an uploaded file. In such conditions you can use preg_replace. I will show you some example code where the output string will be nice and clean and can be used for setting file names.
Implementing multiple color mode switching is so simple! In HTML we can easily add the switching color style sheets as alternative style sheets.
But when it comes to Drupal there is a slight change. Here is how we can implement multiple color switches in Drupal theme. We normally include style sheets in .info file and we cannot specify 'alternative stylesheets' just like in HTML. So here we need a module called Drupal 'Styleswitcher'. By enabling this Drupal module you will get the option 'styleswitcher' to add alternative style sheets.
You might wish to have dynamic page titles in your Drupal 6 website. It is good for a website for the title to change according to the content of a page from an SEO perspective and also for a better content structure. It is very easy to implement dynamic page titles in a Drupal 6 website. Follow the steps below to change the page title according to the url of the page.
There are many situations where you need to print a view within a node in your Drupal website. A good example would be a portfolio page showcasing the Drupal websites you have done using a view slideshow that showcases screenshots of your work. It is not directly possible to print a view within node just like there is no direct method to print a block within a node. However as Drupal is a very flexible CMS and there are methods to print just about anything and that includes printing a view within a node.
We have released a new Drupal theme targeted at small business blogs. The Business Blog theme - is now available on Drupal.org. You can read more at the home page for Business Blog Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.
We have released a new Drupal theme targeted at individuals and small businesses. The Black Blog theme - is now available on Drupal.org. You can read more at the home page for Black Blog Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.
We have released a new Drupal theme targeted at small business websites. The Media Blue theme - is now available on Drupal.org. You can read more at the home page for Media Blue Drupal theme at our free Drupal themes site. As with our other Drupal themes, the theme is released under GPL 2.