1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I need help in to create view templates for page and block

Discussion in 'Drupal' started by shubhamkumarg, Jun 17, 2010.

  1. #1
    Anyone who can help me in template of views page and blocks
     
    shubhamkumarg, Jun 17, 2010 IP
  2. canishk

    canishk Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Goto views and edit your view, select the block or page you want to edit template.

    From the Basic Settings, select Theme Information, there will be a list of output files like style output, display output etc. Select the area you want to modify, and copy the name in bold and goto sites/all/modules/viwes/theme; inside you can find appropriate file in it, copy the same and paste it into your theme folder, it is having the extension tpl.php

    back to views select the last given name in that block of output theme information and rename the file as it is.

    make changes to tpl and save.
     
    canishk, Aug 10, 2010 IP
  3. summapro

    summapro Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First you have to download firebug (mozilla add-ons) and use it to find class and id of your blocks and views. Then styling them by css in your style.css file or local.css. Without firebug or similar browser add-ons, you can do nothing.
     
    summapro, Oct 2, 2010 IP
  4. Lawrence Wright

    Lawrence Wright Well-Known Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    108
    #4
    You could optionally set classes in views. Use those classes to style your views, it's pretty easy.

    Set a class of "myclass"

    Style like this

    .myclass {
    codestuff: values;
    codestuff: values;
    }
     
    Lawrence Wright, Oct 2, 2010 IP
  5. shubhamkumarg

    shubhamkumarg Greenhorn

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    Thanks for helping me. It should work.
     
    shubhamkumarg, Oct 24, 2010 IP
  6. cjscully

    cjscully Active Member

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #6
    Well it's possible to do it without firebug if you want to try to wade through the existing CSS and page output (Ctrl-U) in Firefox and try to match it all up. Don't know why anyone would want to do it that way though. ;)
     
    cjscully, Oct 31, 2010 IP