Friday, March 2, 2012

Drupal7.x: Views - Create Icon link views

It quite complicated to understand view features in Drupal 7.x.
I have been trying to create views for icon with menu links two times but failed.
Today, I tried again and finally successful to create one. Hooreyyy!

How to create views?
  1. Structure  >  Views
  2. Add New View  >  Title: Links > Add Blocks  >  Save
  3. Format: HTML list
  4. Show: Fields
  5. In FIELDS settings:
    add:
    Content: URL  >  Exclude From Display
    Content: صورة >  SHOWREWRITE RESULTS >  Output this field as a link  > Link path : [field_url]
    *Check the available token format from  SHOWREPLACEMENT PATTERNS [field_url] == Content: URL
    - [field_image] == Content: صورة

    Content: Title > 
    SHOW
    REWRITE RESULTS >  Output this field as a link  > Link path : [field_url]
    *Check the available token format from  SHOWREPLACEMENT PATTERNS [field_url] == Content: URL
  6. Apply (All displays) after each settings
  7. Save the views

How to display view in block?
  1. Structure  >  Blocks
  2. Find  View: Links  >  Set Block Region: Sidebar first
  3. Save.
  4. Configure  View: Links 
  5. Set Block Title:  Student Portal Services
  6. Pages > All pages except those listed
    front
    main
    welcome
  7. Languages: Translatable, Not restricted
  8. Save block
  9. Translate  >  Choose Arabic  >  translate
  10. Set Arabic Title:  الخدمات لبوابة الطالب
  11. Save translation
  12. Save block
  13. See the changes in other page than page.
    The block for Student Portal Services will appear, accordingly to your current chosen language.

Drupal: Multilingual- Translate Home Link Setting

About one week we try to translate Home link , but still have issue that both language appear together in main menu navigation. But today we just got idea to create the home link from the main page, insteed of using default front page setting.

How to do?
  1. Disable Home in main menu list link.
  2. Go to main page, let say page name: main  (in  URL path settings )
  3. Edit the page
  4. Go to English first  > Menu Settings  > Thick Provide a menu link
  5. Set  Menu link title: Home    and   Save.
  6. Go to Translate to Arabic page   >  Edit for Arabic language
  7. Menu Settings  > Thick Provide a menu link
  8. Set  Menu link title: الرئيسية   and   Save.
  9. Make sure URL path settings  > Set   Alias: welcome
  10. Refresh the site and check back the main menu navigation.
  11. The new Home menu will appear accordingly to your chosen language.
How to arrange Home menu to be the first in list?
  1. Go to Structure  >  Menus  >  Main Menu   >  List links
  2. You can arrange the weight or drag the link based on me menus priority rank.
  3. Thats it!
Good Luck.