Jump to content

Template Design


crawlerbasher

Recommended Posts

Ok I don't know where to begin to look for the information I need.

So I'm posting here so that some one might have an idea from what I've described.

And help me find what I'm looking for.

 

I would like to be able to use a php script that could phase a HTML and add part of its codes to the HTML its phased.

 

So where it would have in the HTML code

 

{comment}

{date}

{name}

{Race}

{Nation}

{Rank}

{email}

{url}

 

etc...

 

Then it would put in the place of it the output from the database to them markings.

 

eg..

 

Where it says {email} it would be replace with a HTML code like mailto: and then the information from the database.

 

If you understand what I'm trying to get at.

Could you please help me find a good tutorial on doing somthing like this.

 

Thank You.

Link to comment
Share on other sites

Still, I don't see the benefits.

 

What is the major benefits between something like....

 

<html>
  <head>
    <title>{title}</title>
  </head>
  <body>
    {foreach: item}
    <div class="article">
      <h1>{item: title}</h1>
      <p>{item: content}</p>
    </div>
    {end: item}
  </body>
</html> 

 

and.....

 


<html>
  <head>
    <title><?php echo $title ?></title>
  </head>
  <body>
    <?php foreach ($item as $i}: ?>
    <div class="article">
      <h1><?php echo $i->title ?></h1>
      <p><?php echo $i->content ?></p>
    </div>
    <?php endforeach; ?>
  </body>
</html>

 

None. Designers need to learn a new syntax anyway. That syntax may as well be some simple php for a number of reasons. Including the fact that there are many IDE's around that support it (hell, even our forum highlights it).

Link to comment
Share on other sites

Whats Smarty templates?

 

The only resion I've seen {comment} in templates becuase of somthing like it on the phpbb style forum.

Where ppl can customize the forum template.

 

Smarty is a template engine.

 

Like I said though, its overhead for no benefit. PHPBB isn't exactly a good benchmark for application design.

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.