Advice Articles

  • Beginners
    Just getting started? Loads of powerful advice here for beginners.
  • Intermediate
    Got a handle on the basics? Find more advanced topics covered here.
  • Advanced
    Warning! Advanced topics covered here.
  • Affiliate resources
    Affiliate marketing resources for affiliates and affiliate program managers tools, websites, books and articles.
  • Product reviews
    Candid reviews of the latest products to take you to the next level.


 

Affiliate Marketing Forum

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups   RegisterRegister ProfileProfile  Log in to check your private messagesPrivate Messages Log inLog in  
Some sort of dynamic template possible?
Goto page 1, 2  Next
Affiliate Marketing Forum Index -> Do-It-Your-Selfers
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Tue Jan 18, 2005 9:32 pm    Post subject: Some sort of dynamic template possible? Reply with quote

I'm designing my website with simple HTML and Microsoft FrontPage. I made my top logo bar and side menu and then saved it as a template to use as the base for all future pages. That way I just have to add the content and I'm good to go. But on a few occasions already I've decided to make a change to my menu bar, or to change where one of the links in it leads to. This is after I have already used this template to create many other pages. Is there any way I can create a dynamic template that, once changed, automatically updates on all pages?

Another way to ask this is, for all of you who have HTML-based pages and use simple tables to set up your navigation bar on the top or left side, when you want to change something in that menu, how do you make the change to all your pages without doing it manually to each one?
Back to top View user's profile Send private message
Vancouver



Joined: 28 Dec 2004
Posts: 136
Location: Vancouver, B.C., Canada

PostPosted: Tue Jan 18, 2005 10:05 pm    Post subject: Reply with quote

You can either use server side includes or use MSFrontpage's include function.

Server side include means you create a base file for your navigation, logo, etc. with just the html between the <body> and </body> tags then add the following to your template:

<?
include "/path/to/your/file/name.inc";
?>

You must name your base file ***.inc and have server-side includes enabled on your host (probably do).

Otherwise, you can use FP includes by going to "Add Webcomponent" in your "Insert" menu (I'm not sure of the names, could be something else) and choose "Includes" then choose "page".

Do your designs, save the page and voila, you're done.

Cheers.
_________________
Search With Blingo Google and Win Prizes

Website Marketing blog

New York Personal Trainers
Back to top View user's profile Send private message Visit poster's website
AllanGardyne
Site Admin


Joined: 02 Jul 2003
Posts: 5839
Location: by the beach, Australia

PostPosted: Tue Jan 18, 2005 11:24 pm    Post subject: Reply with quote

Do a search on Google for server side includes or SSI.

Vancouver wrote:
You must name your base file ***.inc ...

There are obviously different ways of doing this. I name my SSI files ***.txt and that works OK for me. I use them for headers, footers and navigation links.

It's wonderful being able to make one change in one file and see that change appear on dozens or hundreds of pages.
_________________
Allan Gardyne
... earning a good living from affiliate programs since 1998.
Learn how.
Subscribe now

FREE Affiliate Program Tutorial
Back to top View user's profile Send private message Visit poster's website
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Wed Jan 19, 2005 12:48 am    Post subject: Reply with quote

Thanks for the help, sounds simple enough.

So this is something I can't utilize until my site is actually online?
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1761
Location: Bangor, Maine

PostPosted: Wed Jan 19, 2005 1:01 am    Post subject: Reply with quote

SSI is not processed until you are loaded on the server. You could install the Apache Web Server software on your PC and let it process it there, so you can see it as you develop. But most people just put in the tags, then upload to see the final look.

There are a couple of other good topics about SSI around the forums... if you search you will find them. I know one was discussed just the other day. I think it is Eugen's post in the "Site Review" section.
_________________
Eric D. Burdo
They Made $6,513 a day With Clickbank Doing This...
Back to top View user's profile Send private message Visit poster's website
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Wed Jan 19, 2005 2:01 pm    Post subject: Reply with quote

edburdo wrote:
SSI is not processed until you are loaded on the server. You could install the Apache Web Server software on your PC and let it process it there, so you can see it as you develop. But most people just put in the tags, then upload to see the final look.

I installed Microsoft's PWS server on my small Pentium with Win95, to work with PHP.

It was a bit of a pain, but it worked well for most things that weren't Apache/Linux specific - like Sendmail.

That said, it was more the keen techie in me. For small jobs, you don't need to go this route, as Eric suggested.

Hope this helps,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
Debs



Joined: 16 Aug 2003
Posts: 4296
Location: NY

PostPosted: Wed Jan 19, 2005 3:03 pm    Post subject: Reply with quote

Couple things you will want to check with your webhost first

1. Do they have FP extensions installed and available (some proprietary features of FP will require extensions to use the FP publishing feature to your online site and to "activate" those features so they work properly)

2. If you decide to use straight SSI instead of an FP proprietary SSI or border feature, you need to find out what page extensions your host will allow for the pages you upload ... some hosts restrict to only .shtml or .shtm and won't allow other page extensions to be used like .htm .html etc. Yes, they can be changed to allow any extension, but the question is ... will your host allow this?

Debs
_________________
Learn how to turn keyphrases into quality, well-targeted articles your visitors and SE's will love with Gary Antosh's new ebook "Web Content Made Easy!"
Back to top View user's profile Send private message
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Wed Jan 19, 2005 8:23 pm    Post subject: Reply with quote

Well it seems I'm going to go with 1and1, having trouble finding these exact detail on their site, though.
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1761
Location: Bangor, Maine

PostPosted: Wed Jan 19, 2005 8:25 pm    Post subject: Reply with quote

The Linux hosting on 1and1 defaults to shtml for the SSI extension. YOu can override it for other extensions if you want (using the .htaccess file). They have frontpage extensions on some of their hosting packages, not sure about all. I don't use the extensions myself.
_________________
Eric D. Burdo
They Made $6,513 a day With Clickbank Doing This...
Back to top View user's profile Send private message Visit poster's website
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Wed Jan 19, 2005 9:33 pm    Post subject: Reply with quote

So would you recommend using FP's feature or straight SSI? Which would be more convenient?

If I choose using FP's feature, I'm assuming I just create my base HMTL and upload it, then add web component, go to page, select it, and I'll see it in FP? Then just add my content?

If I choose to use straight SSI, I just add this to the bottom of my base HTML...

<?
include "/path/to/your/file/name.inc";
>

...after the </body> tag? Then I just start off each new page with...

<!--#include file="base.shtml" -->

...go to Design mode in FP, and add content from there?

Am I getting this right?
Back to top View user's profile Send private message
Andrea Thomson



Joined: 14 Sep 2004
Posts: 110
Location: Vancouver, BC Canada

PostPosted: Wed Jan 19, 2005 9:50 pm    Post subject: Reply with quote

Code:
<!--#include virtual="includes/file.htm" -->


If you're comfortable using SSI rather than the FrontPage (proprietary) method of managing includes - go with the SSI method.

This way, you're not tied to any particular wysiwyg editor - making your site more scalable.

Viewing SSI offline - some HTML wysiwyg editors don't show you a proper preview when you're working on your files offline. From FrontPage (or dreamweaver, etc.) the keystroke "F12" will usually open the page to a browser window so you can see your page (and all the includes).

I would also suggest that you practice good "housekeeping" when you start with SSI. Create a folder for all your SSI files so as to keep them in a little collection. Or, use a naming convention to easily find them in an alphabetical listing. For instance, you could name them all with a prefix *i* - such as "i-menu.html", "i-footer.html" etc etc.

my 2 cents.. hope it helps Wink
_________________
Andrea Thomson

professional web designs .:. affordable templates ... and coming soon affiliate templates
Back to top View user's profile Send private message Visit poster's website
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Thu Jan 20, 2005 1:53 am    Post subject: Reply with quote

Thanks for the help. I only plan to have one include file, however: an HTML with my top logo bar, left navigation menu, right side ad bar, and bottom text bar.

I would just like to soldify what I'm doing there to make this work.

Create this "base" HTML with my top logo bar, menu, etc. Add to the bottom

<?
include "/base.inc";
>

AFTER the </body> tag. Then, at the top of each new page, add this:

<!--#include file="base.shtml" -->

or something similar, depending on my exact directories. Then enter design mode in FP, and add to that base HTML (in other words, my content).

Am I good to go here?
Back to top View user's profile Send private message
edburdo



Joined: 14 Jul 2003
Posts: 1761
Location: Bangor, Maine

PostPosted: Thu Jan 20, 2005 2:58 am    Post subject: Reply with quote

Here is how I do mine. Oh, first here is a link to a SSI primer. Much of it is more than you want, but check out the "virtual" section. It is what Andrea outlined above, and is what you need to get started:

http://www.htmlgoodies.com/beyond/ssi.html

Ok, now to the layout. If you want a Logo, Left Nav, Right Side Ad and Bottom Text, that is 4 includes. Each item is its own include.

For the logo, I put all the Logo HTML into the logo.inc file (or whatever you name it). Then in your base HTML page, you put the virtual call to the file in the same place where the logo would go. When the site is processed, it pulls in the contents of that file, and they get processed as part of the master page.
_________________
Eric D. Burdo
They Made $6,513 a day With Clickbank Doing This...
Back to top View user's profile Send private message Visit poster's website
ramac



Joined: 15 Jan 2005
Posts: 39

PostPosted: Thu Jan 20, 2005 3:57 am    Post subject: Reply with quote

Thanks for the link, very clean and concise, I think I get it now.

So how do I set aside the "space" for my top logo on my page? Just a table cell? And then put the include command within that cell?
Back to top View user's profile Send private message
Debs



Joined: 16 Aug 2003
Posts: 4296
Location: NY

PostPosted: Thu Jan 20, 2005 1:33 pm    Post subject: Reply with quote

never add anything
Quote:
AFTER the </body> tag.


Debs
_________________
Learn how to turn keyphrases into quality, well-targeted articles your visitors and SE's will love with Gary Antosh's new ebook "Web Content Made Easy!"
Back to top View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Affiliate Marketing Forum Index -> Do-It-Your-Selfers All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Your host: Allan Gardyne.
Earning a good living from affiliate programs since 1998.