View Full Version : How to add text & pictures to directory pages
FranceFan
10-29-2005, 01:27 AM
I would like to add some text (and maybe a picture or two) to the various pages (in particular the front page). Looking at the Wiki (see below) there is an explanation but I don't understand it. In particular, what is the filename (where is the file) that defines the format for the front page and for the category pages? For the front page I want to insert some text before the category list and some after.
Following is the WIKI explanation:
---------------------------------------
Just open up one of the template and put this code in here. Using this IF statements allows you to insert code only for the homepage in any of the template files.
{if $category.ID eq 0 and not $p}
<h1> This is the first screen! </h1>
{/if}
"eq 0" means the category is 0, and "not $p" prevents anything from appearing on the Top Hits and Latest Links pages.
vkaryl
10-29-2005, 01:48 AM
This code goes in main.tpl I believe. The way this is laid out, the pages are ALL produced by the combination of header.tpl, main.tpl, top_bar.tpl, and footer.tpl (and in the case of some of my own templates, sidebar.tpl and colophon.tpl). It's confusing to begin with, because there's no clear "division" into, say, an index page, sidebars, footers, etc.
Tim_Myth
10-29-2005, 02:56 AM
There isn't one file for the front page and one for the category pages. Instead each page is dynamically built from the template files. These are the .tpl files in the templates folder. To vary the photos by page will require some extensive modification to the main.tpl file. If you can't figure this out, some here will be willing to help you provided you give an example of what you want. Of course, offering money will always help with speed and efficiency. ;)
Tim_Myth
10-29-2005, 02:58 AM
vkaryl Posted: Fri Oct 28, 2005 6:48 pm
tim_myth Posted: Fri Oct 28, 2005 7:56 pm
Wow I gotta learn to finish my replies in a more timely fasion. No one had replied yet when I started mine. After taking a kid to the clinic, helping my wife set up for a gig, and eating dinner, I've finally gotten back to it. phew...
vkaryl
10-29-2005, 03:06 AM
Well, medical stuff and food definitely take precedence! Hope the child is okay, and dinner was great! Wife, gig = ? Music? Dance? Poetry? Song?
FranceFan
10-29-2005, 04:42 PM
Tim and Vkaryl
Thank you for the solution. I'll give it a shot over the next few days.
Doug
Tim_Myth
10-29-2005, 06:47 PM
*Tim stands on table and pulls out a gun to hi-jack the thread...*
"Everybody be cool! This is a robbery!"
-----------
My 2 year old has a bad cold. His breathing was shallow and rapid, and he was not his usual two year old self, so I took him to the walk-in clinic. I got there at 7:59 by my clock, but their clock is obviously different because they had already closed their doors. So I figured I'd just watch him and take him in this morning. After 10 good hours of sleep, he seems a lot better. He's still got a runny nose, but is back to his usual self of pulling all the clothes out of his drawers, emptying the contents of his toy box on the living room floor, and stealing his little sister's bottle. :?
My wife owns a DJ & karaoke company, and one of her regular karaoke spots called her last night because their scheduled band didn't show. So, she called two of her DJs but didn't get a response from either. That meant she had to go, but she broke her foot in May, and it hasn't healed to the point that she can lift 80 lbs. speakers yet. That meant I had to load them. :roll:
Dinner was dinner. We had pork chops which were good, but I'm not a big meat eater. I'd be happy with a nutrient paste. To me, eating is something I have to do. Don't get me wrong, I enjoy eating when I want to sit back and take the time, but I usually want to do something else so eating just becomes a chore. Weird I know, but as much as I'd like to deny it, I am a geek. :oops:
vkaryl
10-29-2005, 08:38 PM
I don't even bother to deny I'm a geek. No point in it.... I usually eat breakfast and lunch at the computer - even if lunch is quesadillas with sloppy salsa (I just try to miss the keyboard....), though I do sit down for about 10 minutes with my husband to eat dinner. I love food, it's not that, I'm just not into spending gobs of time on meals....
Glad your boy seems better, and hope your wife's foot is back to normal soon. Hard for a geek to admit he can lift 80 pound speakers.... kind of like me admitting I can shoot, clean, and butcher a buck.... but of course I can.
Hijacked? Oh well.... doesn't happen often, we can probably get away with it this time!
FranceFan
11-02-2005, 12:59 AM
Well, today I implemented the solution in this thread. Works great, thank you very much.
Also, reference the comment on image versus text, no problem inserting images (see map added at Directory France). I just FTP the GIF file to HTTPDOCS and then reference it as normal using the SRC command. Well, to be honest, since I didn't know how to do this, I pasted the image into a FrontPage file, then looked at the code that Frontpage generated, and cut-and-paste the code into the main template page. It works.
Anyways just a thank you and the comment about the image in case anyone was wondering.
vkaryl
11-02-2005, 03:53 AM
Glad to hear it, Doug - and the info about the image is definitely appreciated!
Best to you....
V
Tim_Myth
11-02-2005, 03:33 PM
Content visible to registered users only.
That's how I started learning HTML! :D W3schools.com is also a great resource. I did pretty much the same thing with macros in Excel to learn VBA, and then translated that knowledge to VB. I took some programming classes a long time ago, but I never bothered to keep my coding knowledge current so when this new software called "Windows" became popular my knowledge became less and less useful. I can still work with CPM and code applications with Applesoft Basic or GW Basic, but that's about like knowing how to build an outhouse. :)
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.