No Comments

Convert Drupal 6 to Drupal 7

Converting from Drupal 6 template to Drupal 7 involves a number of changes on different segments such as Info File, Theme Settings, Templates, HTML, Page.TPL, Region.TPL, Block.TPL, Node.TPL, Comment, Search Theme From, CSS, Javascript, ans Skinr. The whole process is written in PHP, so you need an extensive knowledge of the programming language to convert Drupal 6 template to Drupal 7. However, the step by step process of changing templates is mentioned below:

Converting Drupal 6 to Drupal 7:

    • First of all, you need to add classes to variables in the template. The process of sending body classes from template.php to templates is now standardized. Name the variable as $vars.

 

    • Rows are considered as regions. Regions don’t have any direct impact after the conversion, but when it comes to fusion rows, regions should be changed a bit. You should have region.tpl.php template file as well as a preprocess function. The function that was found in the grid row should be converted to the region template and at the same time functions as well. So, now you have grid row in the form of page.tpl.php format.

 

    • You should use the render to complete the conversion from grid to region. You can read the layout settings of grid from.info file. You also can read them template.php. However the first option would be easier for you if you are a beginner.

 

    • Drupal always have contextual links. You need to remove the fusion’s code for editing block links. You also have to remove the function called, fusion core preprocess comment wrapper, so that you can easily remove the unused constants, created by this function.

 

  • Lastly, you need to remove the pre-rendered Ubercart code and set it in node-product.tpl.php template. This step will help you to make Drupal 7 Ubercart.

Now that the template files are ready for conversion, you need to employ some more steps to utilize them in the real-time functions:

  • Region.tpl.php is a new template in the fusion core. Drupal 6 grid_row file does the same thing as Region.tpl.php in Drupal 7, but the latter is slightly modified for adding extra functionalities.
  • After the changing, there will not be any default search box in Drupal 7. The version has a new search box as search_block_form.tpl.php in drupal 7.
  • You should integrate all new templates with the markup including their attributes and classes. You can use the templates as reference in the fusion core.

Now the themes of drupal 6 have been converted to drupal 7 and they are ready to be used.

 

You might also like
News, Tips
News, Tips

More Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.