Styling views in Drupal

Steps :

1.   Add field(which to display) and check the option “Exclude from display“.

2.  Now go to “Rewrite Results” and check the option “Rewrite the output of this field” and below there is a section called “Replacement patterns” where all the added fields appear as token(saying variable just for easy understanding) Like :

[title] == Content:

Title [field_event_date] == Content:

Event Date [body] == Content:

Body [body-value] == Raw value

3.  Above there is a text ares called “Text” where you can customise your style for this field(Not good practice follow step 4 for better)and clicl “Apply All”.

4.  Now add one more field(this is an extra field) called “Global: Custom text” , DO NOT check “Exclude from display” and below text area called “TEXT“is the area where we will be writing our HTML codes for styling the views using all the fields which are available as token here under the option “Replacement patterns“.

5.  Click on the “Apply All“, And YES its done.So simple and cool na??

Posted in Drupal, Mixz Tricks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Follow me on Twitter

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 443 other followers

%d bloggers like this: