68 Classifieds Basic Structure for Design Part 2

A look in the template folder
This is the second part of this ongoing series. If you haven’t read the first part, you should start here.

Now that you’ve gotten all set up for your custom template for your 68 Classifieds site by making your backups, making your own custom template folder, you’re probably wanting to start making some changes. We will get to that, but we still have plenty to learn before we delve into that part. Remember that the article series is called the “Basic Structure for Design!”.

First thing that we want to do is take a look inside your template folder and discuss what we have there. Go ahead and open your custom folder, I’ll wait… Got it? Great. Now, let’s have a look.

There’s probably a lot more there than what you thought there would be. If you’re getting scared now, don’t be. Most of these things you won’t ever need to touch. The reason I wanted you to have a look is to notice that almost all of the files there have an extension of “.tpl”. This means that it is a template file. Each template file has a specific purpose and is used to display content for that specific purpose. There is not even one “.php” file in sight. That is also why you don’t need to have the developers version just to modify the look and feel of your site.

If you have looked at the included purple template, you will notice that it doesn’t have anywhere near as many files. Why is that? That is another beauty of the way that 68 Classifieds was designed. Essentially, if the classified script makes a call to a template file that isn’t in your custom template, it will then automatically look for it in the default template folder. This should tell you that you should NEVER delete your default template folder!!! You have been warned. :)

Alright, now we want to take a look at what we actually have here and why. It may seem a little silly right now to study this folder’s content, however as you get deeper involved in the development of your site, you will be glad that you did. Basically, you have individual template files and you have folders. The folders contain groups of related template files in a folder named accordingly for the group. If you look inside any of these folders, you should see what I mean.

I will point out at this time, that there are two folders that are no longer used. They are the membercheckout and memberships folders. These are unfortunate remnants from a feature in previous versions of the Classifieds script that are no longer in use, but were never deleted from the template. (Don’t ask, because explaining it would be a whole new article or three at least!) If you would like, you can delete these folders and no harm will be done.

There are two other folders that are also exceptions to having template files in them and they should be self explanatory. They are the images and the css folders. (Note: Any images that you are going to add for the look and feel of your site should go in this image folder and NOT the images folder in the classifieds main directory)

It would serve you well to go ahead and explore each of these folders now. Make a mental note of each folder name. Later on as you work on your site and you want to change something, then you’ll remember something like, “Oh, yea that would be in the checkout folder!”

If you recall the mention of the templating system, Smarty that I mentioned previously, these template files are what is used in that system. Many of these files don’t seem like they are complete, but they actually are as complete as they need to be. Most of these files are used within another file to complete a whole web page. Think of them as building blocks. If you wanted to make a house out of building blocks, you would use many blocks together to create it.

Bookmark and Share

Comments are closed.