04. Making a Blog with qEngine: Part 4

On this final chapter of qEngine tutorial, I want to discuss some minor things such as multi skin, common skin, language variables, and more.

Multiple Skins & Common Skin

qEngine supports multiple skins but only one skin may be active at one time. Creating a new set of skin for qEngine is very easy:

  1. Copy /skins/default folder & its contents to /skins/mySkin folder.
  2. Start by modifying /skins/mySkin/outline.tpl, don't forget to change CSS value to point to your new skin folder.
  3. To activate the new skin, go to ACP > Tools > Site Configuration > Engine Settings > [Tab] Look & Feel, on Template setting, select your new skin.

Common Skin

You may wonder why there are only a few files in /skins/default, that's because qEngine also uses template in /skins/_common folder as shared template folder.

When you open /skin/_common folder, you will see there are a lot more files there, e.g.: page.tpl, page_list.tpl, default.css, jscript.css, etc.

If qEngine can't find a template file in /skins/[skin_folder], it will try to find the file in /skins/_common folder. E.g., when you open "About Us" page:

  1. qEngine will first try to open /skins/[current_skin]/page.tpl
  2. If it can't find the file, it will try to find it in /skins/_common/page.tpl
  3. If for some reason neither folder has the file, qEngine will display error message.
  4. This means, you can include or omit /skins/[current_skin]/page.tpl in your skin.

This approach allows you to create a unique page.tpl for a specific template, or you can use default page.tpl to save time & space also to keep a consistent design along your skins.

Language Variables

While editing template files you may find some regular template vars, such as {$main_body}, {$page_title}, {$page_body}, and language vars, which are indicated by {$l_} prefixes, e.g. {$l_posted_by}, {$l_posted_on}, {$l_posted_date}.

Regular vars usually script dependent. Which means you can't use {$page_title} in contact.tpl, or {$page_image} in welcome.tpl.

But, unlike regular vars, language vars are more flexible, you can use them everywhere. For example, you can use {$l_welcome} in any template files. There are some language vars that can only be used in specific files, but most of them are free to use everywhere.

To modify the value for language vars, go to ACP > Tools > Language Editor. There you can view, edit and even add new language vars.

BEGIN Control

qEngine also have some simple control tags, which are:

  • <!-- BEGINIF condition --><!-- ELSE --><!-- ENDIF -->
  • <!-- BEGINBLOCK --><!-- ENDBLOCK -->
  • <!-- BEGINSECTION --><!-- ENDSECTION -->
  • <!-- BEGINMODULE --><!-- ENDMODULE -->

For more information about this, please visit my old documentation: https://www.c97.net/docs/3-skinning.php

That's All, Folks!

In this short chapter, I have concluded our brief tutorial on modifying qEngine. As you have learnt, modifying qEngine is really easy. The possibilities are endless. But if you stuck, feel free to contact me or post your questions in the forum.

 In upcoming chapters I will discuss Cart Engine & Kemana Directory usage. I will not cover on modifying Cart Engine & Kemana as both scripts are using qEngine, but instead I will cover on general usage, and day-by-day maintenance.

I welcome any comments & suggestions, feel free to post them in the comment box below.

Posted On: Dec-18-2016 @ 04:40pm
Last Updated: Dec-18-2016 @ 04:52pm

There is no comment. Why not be the first?

More Comments/Post Your Own


Online Users

There are 117 users online.


Connect with us on Facebook


Subscribe to our newsletter for the latest updates and exciting promotions!