Layout requirements for drupal

    More than once I came across a problem when they send layout and everything seems to be fine there, but when you start screwing to drupal, you come across the fact that you either need to redo the layout or rewrite the theme functions. And in the end, the process of theming because of this can significantly increase. Therefore, we at work decided to write requirements for layout under drupal. Below are the requirements for the main elements.

    Menu


    Copy Source | Copy HTML
    1.   


    It is better to try to wrap even the ul menu in a div and css to access it through it. Type of such:

    Copy Source | Copy HTML
    1. .mymenuclass {}
    2. .mymenuclass UL{}
    3. .mymenuclass UL LI{}
    4. .mymenuclass UL LI A{}
    5. .mymenuclass UL LI A:hover{}
    6. .mymenuclass UL LI.active-trail {}
    7. .mymenuclass UL LI.active-trail A{}


    Pager



    Copy Source | Copy HTML


    Blocks



    If there are blocks on the site, then you should arrange them in a single style. Those. so that the html of the block templates looks the same (if possible of course)
    For example, like this:

    Copy Source | Copy HTML
    1.   

      Заголовок

    2.  
    3.   
    4.     
    5.  
    6.   


  • As a blockid, we use a unique id for the block, through which we prescribe the uniqueness of this block in styles if necessary.

    Test content



    Insert the following content into the content area (full text of the news, text page, etc.):

    Copy Source | Copy HTML
    1. Lorem superscript dolor subscript amet, consectetuer adipiscing elit, test link.

    2.   Nullam dignissim convallis est. Quisque aliquam. cite.
    3.   Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.
    4.   Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus.
    5.   Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. NBA Mauris a ante.
    6.   Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc.
    7.   Morbi imperdiet augue quis tellus. AVE
    8.  
    9.   

    10.     “This stylesheet is going to help so freaking much.”
    11.     
    12.     -Blockquote
    13.   


  •   
  •     
  •       
  •       
  •       
  •     
  •     
  •       
  •       
  •       
  •     
  •     
  •       
  •       
  •       
  •     
  •     
  •       
  •       
  •       
  •     
  •   
  • HeaderHeaderHeader
    DataDataData
    DataDataData
    DataDataData


    This is certainly not all. But if the layout designer adheres to at least such requirements, then the process of theming Drupal will take less time.

    In addition to this article, I also recommend reading Versta under drupal. Forms

    If someone has similar developments, then I will be glad if share. Additions are also welcome;)

    Also popular now: