drajathasan/slims-opac-template-skelton

A starter template without any styling components

v1.0.1 2023-09-24 09:25 UTC

This package is auto-updated.

Last update: 2024-10-27 07:59:44 UTC


README

If you want to create your own SLiMS Template. Please follow this step:

  1. Create your template directory inside /template/. E.g: my_template.
  2. Create new file named with index_template.inc.php
  3. Put this code into that file :
<?php
use SLiMS\Template\Skelton\Core as Template;

require __DIR__ . '/vendor/autoload.php';

// Initialization template instance
$template = new Template;

// set basic properties
$template->setProperty('notes', $notes??null);
$template->setProperty('subject', $subject??null);
$template->setProperty('metadata', $metadata??null);
$template->setProperty('maincontent', $main_content??'');
$template->setProperty('image_src', $image_src??'');

// Rendering opac to template
$template->render($opac??$this);
  1. Next you need composer to install this packages.
composer require drajathasan/slims-opac-template-skelton
  1. Login into admin area, and change template in theme menu.
  2. Choose "base" then open OPAC again.