Drupal - include PHP file

0 votes
947 views
added Aug 10, 2018 in Drupal by LC Marshal Captain (25,790 points)
edited Jan 8, 2019 by LC Marshal

Create a include .php into \yoursitename\sites\all\themes\yourtheme\templates\include\prop-sidebar.inc.php

Open the master .php file where the above include file to be included. 

Add the following line to include the file

<div class="col-md-3"> <?php include(drupal_get_path('theme', 'sello') . '/templates/include/prop-sidebar.inc.php'); ?></div>

 

3 Responses

0 votes
responded Jan 8, 2019 by LC Marshal Captain (25,790 points)
<?php 
  // include(drupal_get_path('theme', 'markone') . '/templates/include/ads/ads-sto.inc.php');
  include(drupal_get_path('theme', 'markone') . '/templates/include/ads/banderole-ros.inc.php');
  include(drupal_get_path('theme', 'markone') . '/templates/include/ads/sto.inc.php');
  include(drupal_get_path('theme', 'markone') . '/templates/include/ads/catfish.inc.php');
  include(drupal_get_path('theme', 'markone') . '/templates/include/ads/textads.inc.php');
?>

 

0 votes
responded Jan 30, 2019 by LC Marshal Captain (25,790 points)
<?php 
  include(drupal_get_path('theme', 'markone') . '/templates/include/ads/textads.inc.php');
?>
0 votes
responded Jan 6, 2020 by lcjr First Warrant Officer (11,790 points)
<?php  
    include(drupal_get_path('theme', 'markone') . '/templates/include/modules/live-year.inc.php');
?>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...