*sigh* you still don't get it.... no, tpl is not like CSS. Its an information structure file at best. The user interface basically has 2 components
- Information Structure (semantic)
- Interface Style (presentation)
The structure of the information is independant from how it would be styled. For example.
CODE
<html>
<head>
<title>{SITE_NAME}</title>
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
</head>
<body>
<div id="header">
<h1><img src="{SITE_LOGO}" alt="{SITE_NAME}" /></h1>
<div id="navigation">
{NAVIGATION_MENU}
</div>
</div>
<div id="content">
{CONTENT}
</div>
<div id="footer">
{FOOTER_MSG}
</div>
</body>
</html>
That is an example of a template file. The file extension doesn't matter.. it could be .tpl, .html, .pennywise, etc. What is important is that the templating engine knows how to parse the variables or control structures... which in this case would be anything between {}.
The style would be based on the CSS file, so you could have the navigation menu on our left, at the top, on the right, etc.
So here are some examples of how template files and css are used.
PHPBB- Information Structure (.tpl)
- Interface Style (.css)
My own CMS- Information Structure (.html) (i use the SmartTemplate templating engine)
- Interface Style (.css)
ASP.NET- Information Structure (.aspx)
- Interface Style (.css)
So in ASP.NET you already have your template file... its the
.aspx file. Your application logic should be in the
.aspx.cs file and how you style your site should be based on
.css.
This post has been edited by silverhawk: Feb 20 2006, 01:43 PM