Knowledgebase



 Categories





 Dimofinf Mobile


Subscribe now to Dimofinf Mobile and enjoy a wide range of premium services. You will receive our SMS text messages wherever you are for a very low cost! More


 Currency Converter


  • Currency
  • US$ Amount

Calling a Programming Block



You can call a file and display it inside a block in the magazine by following these steps:

  1. Create a file for the block with php extension, the contents of the file should have the form:
  • This example uses only one value called “YOUR  DATA HERE” this to show that it must be in the variable “content

PHP :
{* php buffer start *} <?php
$content 
="YOUR DATA HERE";
?>
{* php buffer end *}

All the contents you want to show must be in the variable “content”

  • Another example

PHP :
{* php buffer start *} <?php
$content
"hello";
for(
$i=0;$i<10;$i++){
$content .=$i."";
if (
$i==5){
$content .="This is number 5";
}
}
?>
{* php buffer end *}

  1. Upload the php file to “blocks” directory, make sure to change its name to block-xxxx.php, replace xxxx with the file name you wish
  2. After that add a block to the control panel from the path:

Styles & Blocks > Blocks > Add

  • Type a name for the block to be used in the control panel.
  • Title: Appear in the block head when displayed in the site interface, leave it empty to hide the block head.
  • Block Place: Choose where to display the block (Left of the home page, Right of the home page, Center of the home page).
  • Order: Choose the order of displaying the block in the site.
  • Content: leave it empty
  • Block File: Choose the file that you previously uploaded for example: block-xxxx.php

Then press “Submit


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Calling an External Content (Views: 4994)

Calling an External Content To call a file and display it in the site follow these steps:...


Add a New File Extension (Views: 5935)

You can use the following steps to add new file extensions to Dimofinf CMS Open...


Installing Dimofinf CMS on Local Server (Views: 8744)

Installing Dimofinf CMS on Local Server...


Modifying Dimofinf CMS Logo (Views: 5828)

Modifying Dimofinf CMS Logo                 Very important notes before you start...


Changing the Site Favicon (Views: 5495)

Changing the Site Favicon Very Important notes before you start The file format...



Online