...

View Full Version : Template System



bigjoe11a
09-29-2007, 06:07 AM
Does any one know any thing about a template system.

index.php // index page
index.tpl // file that use to modify and change the index.php file with templates

garydarling
09-29-2007, 06:21 AM
There are plenty of templates out there for CSS sites; and plenty more for php sites based on a Content Management System (CMS). What is your question?

Gary

bigjoe11a
09-29-2007, 06:25 AM
There are plenty of templates out there for CSS sites; and plenty more for php sites based on a Content Management System (CMS). What is your question?

Gary

Hi! Gary. My question is that I wanted to learn some thing new. Just looking for a very small sample or some thing. I been doing searches for it. Just no samples

Thanks again.

Joe

garydarling
09-29-2007, 06:49 AM
That's great, I like learning new things myself. If you want a CSS template to get started with your own basic site, visit Andreas Viklund (http://andreasviklund.com/templates/). he has some of the best free templates available, and they are a great way to get up and running with a minimum of hassle.

Next up, check out Stu Nicholls (http://www.cssplay.co.uk/) site, he has lots of experiments with layouts, menus, etc.

Then I would go to Web Design from Scratch (http://www.webdesignfromscratch.com/) to get a primer on the current state of web design.

If you want to make a big jump and go to a CMS system, Mambo, WordPress and Joomla are big names in that game. If you choose the right host, my preference is Siteground.com, they have auto-installers that do the work for you in setting up the framework. All you do is style it and add content.

Hope that helps.

Gary

bigjoe11a
09-29-2007, 03:11 PM
That's great, I like learning new things myself. If you want a CSS template to get started with your own basic site, visit Andreas Viklund (http://andreasviklund.com/templates/). he has some of the best free templates available, and they are a great way to get up and running with a minimum of hassle.

Next up, check out Stu Nicholls (http://www.cssplay.co.uk/) site, he has lots of experiments with layouts, menus, etc.

Then I would go to Web Design from Scratch (http://www.webdesignfromscratch.com/) to get a primer on the current state of web design.

If you want to make a big jump and go to a CMS system, Mambo, WordPress and Joomla are big names in that game. If you choose the right host, my preference is Siteground.com, they have auto-installers that do the work for you in setting up the framework. All you do is style it and add content.

Hope that helps.

Gary

Gary thats not what I was looking for. I fount 1000's of web sites that can give me that kine of information. HTML, and CSS I'm still learning CSS. What I'm looking for is a TEMPLATE SYSTEM. If you used joomla and some of the others. They use templates for content setup for each page they have.

Thats what I'm looking for. I been doing some searches on yahoo, google and ask.com and haven't come up with any samples yet

Joe

rmedek
09-29-2007, 03:23 PM
bigjoe11a,

Can you be more specific? Are you looking to learn how to code your own template system? Or maybe be introduced to a simple, pre-built CMS that uses HTML templates?

I know you said you were looking for "samples," but an HTML template system can be pretty complex and usually works in conjunction with a server-side coding framework of some kind and a database. It's like asking to see a small sample of how to build a skyscraper. :)

The gist of it is, the template contains HTML code with a reference to code that's inserted later. As an example:


<h2>{title}</h2>
<div class="article_content">
{body}
</div>

…in this case {title} would be replaced by the article title, and {body} would be replaced by the article body. The replacing gets done by the system powering the templates.

bigjoe11a
09-29-2007, 03:34 PM
bigjoe11a,

Can you be more specific? Are you looking to learn how to code your own template system? Or maybe be introduced to a simple, pre-built CMS that uses HTML templates?

I know you said you were looking for "samples," but an HTML template system can be pretty complex and usually works in conjunction with a server-side coding framework of some kind and a database. It's like asking to see a small sample of how to build a skyscraper. :)

The gist of it is, the template contains HTML code with a reference to code that's inserted later. As an example:


<h2>{title}</h2>
<div class="article_content">
{body}
</div>

…in this case {title} would be replaced by the article title, and {body} would be replaced by the article body. The replacing gets done by the system powering the templates.

Thanks Richard, Thats what I wanted to learn. Thats all I'm looking for is some samples. I played with CMS before. I deleted it because I couldn't get help on it. The CMS forums section was a joke.

If you have some small samples that would be great

Joe

rmedek
09-29-2007, 03:44 PM
Sure, here's the template that powers the home page on my personal site (http://richardmedek.com). I use ExpressionEngine as my CMS.


{!-- template variables --}
{assign_variable:this_weblog="home"}

{!-- header, page title, body ID --}
{embed="includes/header" disable="categories|member_data|pagination|trackbacks" section_title="home" page_title="drums"}

{!-- begin template HTML --}
<div id="main_wrap">
<div id="main">

{!-- pull latest news entry --}
{exp:weblog:entries weblog="news" orderby="date" limit="1" }

{!-- article image --}
{if article_image}
<div id="article_image">
<a href="{title_permalink=news/comments}">
{exp:html_strip keep="img"}
{article_image}
{/exp:html_strip}
</a>
</div>
{/if}

<div class="article">
<h2>{title}</h2>
<p class="article_date">{entry_date format="%F %d, %Y"}</p>

{if excerpt}
{excerpt}
{if:else}
{body}
{/if}

<p class="more article_info"><a href="{title_permalink=news/comments}">Read more…</a> |
{if comment_total > 1}
{comment_total} comments so far
{if:elseif comment_total == 1}
{comment_total} comment so far
{if:else}
no comments yet
{/if}
</p>
</div>
{/exp:weblog:entries}
</div>
</div>

{!-- sidebar --}
{embed="includes/sidebar"}

{!-- footer --}
{embed="includes/footer"}


I played with CMS before. I deleted it because I couldn't get help on it. The CMS forums section was a joke.

I don't know what CMS forum you're talking about but keep in mind you need to ask detailed questions to get a detailed answer. ;)

bigjoe11a
09-29-2007, 03:55 PM
Sure, here's the template that powers the home page on my personal site (http://richardmedek.com). I use ExpressionEngine as my CMS.


{!-- template variables --}
{assign_variable:this_weblog="home"}

{!-- header, page title, body ID --}
{embed="includes/header" disable="categories|member_data|pagination|trackbacks" section_title="home" page_title="drums"}

{!-- begin template HTML --}
<div id="main_wrap">
<div id="main">

{!-- pull latest news entry --}
{exp:weblog:entries weblog="news" orderby="date" limit="1" }

{!-- article image --}
{if article_image}
<div id="article_image">
<a href="{title_permalink=news/comments}">
{exp:html_strip keep="img"}
{article_image}
{/exp:html_strip}
</a>
</div>
{/if}

<div class="article">
<h2>{title}</h2>
<p class="article_date">{entry_date format="%F %d, %Y"}</p>

{if excerpt}
{excerpt}
{if:else}
{body}
{/if}

<p class="more article_info"><a href="{title_permalink=news/comments}">Read more…</a> |
{if comment_total > 1}
{comment_total} comments so far
{if:elseif comment_total == 1}
{comment_total} comment so far
{if:else}
no comments yet
{/if}
</p>
</div>
{/exp:weblog:entries}
</div>
</div>

{!-- sidebar --}
{embed="includes/sidebar"}

{!-- footer --}
{embed="includes/footer"}



I don't know what CMS forum you're talking about but keep in mind you need to ask detailed questions to get a detailed answer. ;)

I'm not going to be able to under stand any of that. I have no idea how it works.

And the questions I was asking were in fact at great detail including some code. And CMS if your talking about the same thing I am. Theres a CMS PHP code that sets up like joomla or drupal but not has complexed as the others

See the problem was adding the {code} in the content to get the look you wanted and to add options to the page. Thats why the documents were out dated so every thing you wanted to do, You couldn't unless some one could help you to under stand the {code} and how to set it up.

What I mean is that where did the information come from when you use.
{header}
{title}
{content}
{footer}

Now do you under stand what I'm trying to say.

Joe

rmedek
09-29-2007, 04:11 PM
What I mean is that where did the information come from when you use.
{header}
{title}
{content}
{footer}


The information (i.e., {content}) came from ExpressionEngine, as that's what I use as my CMS. If you use another CMS, they will give you different template variables you can use. In case we're getting mixed signals, a CMS is a Content Management System; Joomla, ExpressionEngine, Wordpress, Textpattern, etc., are all CMSes of some sort. CMS does not refer to a specific script.

If you don't use a CMS, you will likely need to build a database to store the information and a custom script using a server-side language like PHP to interact with the database.


Theres a CMS PHP code that sets up like joomla or drupal but not has complexed as the others

I don't know what code you're referring to. It sounds like you have something specific you've tried before, and you would need to talk to those developers or community for help.

bigjoe11a
09-29-2007, 04:24 PM
Richard, Thanks. There is a lot more to it then I thought.

Any way theres a PHP script out there called CMS. It lets you build a web site using there scripts. Like joomla and drupal. Its called CMS. and this script has a main web site and a forums section where you should be able to get help.

Theres two (2) kinds that I know of. Thats more then likely thats why they call it CMS.

Thanks for your time Richard.

Joe



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum