Jump to content

[SOLVED] QuickSkin template system


Jaguar

Recommended Posts

Does anyone use QuickSkin? http://quickskin.codeworxtech.com/ It uses syntax like <!-- IF true --> do this <!-- ELSE --> do that <!-- ENDIF -->

 

I really like the style, but it doesn't seem very popular or well supported. I know of Integrated Template, but from what I can tell it doesn't support if statements, which I want. Does anyone know of any similar template systems that support if statements, includes, and loops using HTML comment style?

Link to comment
Share on other sites

Why use a template engine to slow your application down? They simply add another layer of complexity. Any designer still needs to learn a new syntax, they may as well learn a little php. eg;

 

<html>
  <head>
    <title><?php echo $title; ?></title>
  </head>
  <body>
    <?php
      if ($contents) :
        foreach ($contents as $content) :
    ?>
      <h1><?php echo $contents['title']; ?></h1>
      <p><?php echo $contents['data'] ?></p>
    <?php
        endforeach;
      endif;
    ?>
  </body>
</html>

 

its just as simple IMO and much quicker then any template engine.

Link to comment
Share on other sites

Yeah, yeah.

 

I have my pages setup that way now. The problem I'm having is with my header file. It has a lot of variables and is included on many different pages. The problem is I do not set some of those variables on every page. So, warnings pop up. Yes, I know I can disable the warnings, but I'm anal and find warnings unacceptable.

 

The solutions are:

 

1. Use isset() in the header template file. I don't want to do this because I'm trying to keep functions of the template.

 

2. Set all the variables used in the header on every page. This seems wrong because I end up with a HUGE list of $var = NULL.

 

3. Use a template system that will convert <?php if($show_button): ?> (or <!-- IF show_button -->) to <?php if(isset($show_button) && $show_button): ?>. I know other template systems do this, but I prefer the HTML comment syntax.

 

4. ??? maybe you can think of something else?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.