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
https://forums.phpfreaks.com/topic/197421-template-design/
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
https://forums.phpfreaks.com/topic/197421-template-design/#findComment-1036227
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
https://forums.phpfreaks.com/topic/197421-template-design/#findComment-1036263
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.