|
| |
|
|
_gail
Posts: 2874 From: So FL Status: offline
|
RE: Front Page Includes - 9/16/2002 11:41:49
You will fall in love with inlcudes, c1sissy, I made an inquiry about a great Outfront article covering this just the other day. Abbeyvet provided the links. Enjoy! This one is about various global elements in FP: This one offers alternatives to FP includes: http://www.outfront.net/tutorials_02/getting_started/extension_alternatives.htm See Item 6. gail
|
|
|
|
_gail
Posts: 2874 From: So FL Status: offline
|
RE: Front Page Includes - 9/16/2002 12:51:39
Ooooops, left one out. Sorry. This one is about various global elements in FP: http://www.outfront.net/tutorials_02/fp_techniques/global_elements.htm Includes handle " elements that appear on multiple pages." For example, you make an include page that contains all the header links which are to appear on many pages in a website. You insert the include on all those pages. If you need to change one link down the road a piece, the change is automatically updated on the other pages. For them to function properly, I believe all pages have to be uploaded again, not just the include page. Someone please correct me if I' m wrong. gail
< Message edited by _gail -- 9/15/2002 12:57:50 PM >
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: Front Page Includes - 9/17/2002 1:42:04
Maybe this will help. Think about a page full of code, but in the middle of it there' s blank space with the words <INSERT PAGE1 HERE>. And whatever code is in Page1 will replace it. main page <body> <p>Look at all this text</p> <a href=" mylink.htm" >And some links</a> [Insert Page1 HERE] <p>Here' s some more text</p> </body> Page 1 <body> <p>Here' s some text that I' ll want to change every few days</p> <a href=" dailyhyperlink.htm" >And a special hyperlink</a> </body> What happens is that where [insert Page1 HERE] is, when you actually go to get the page the code from Page 1 appears in the main page. Now think about having a bunch of links you want to appear on every page. Just put them on a page and insert the include page instead of cutting and pasting that code over and over. Then if you want to change that text just change the include page instead of having to cut and paste. Any clearer?
_____________________________
" Things are always darkest, just before it goes totally black." -Hannibal Smith
|
|
|
|
monstertrap
Posts: 153 Joined: 5/1/2002 From: Rocky Mount, North Carolina, USA Status: offline
|
RE: Front Page Includes - 9/17/2002 13:03:55
This question may sound stupid to the pro' s, but is there a need to put included pages in a _includes folder? If so, why? Thanks John K.
|
|
|
|
Charles W Davis
Posts: 1725 Joined: 3/7/2002 From: Henderson Nevada USA Status: offline
|
RE: Front Page Includes - 9/17/2002 16:14:09
John, My answer is that the _includes folder is always available no matter which page is being opened in the browser.
_____________________________
Enjoy! It' s your endeavor! http://www.anthemwebs.com
|
|
|
|
Seventh
Posts: 1235 Joined: 8/4/2002 From: The Motor City Status: offline
|
RE: Front Page Includes - 9/17/2002 17:50:49
Hey, Monstertrap. We don' t ask stupid questions here. We ask questions that need answers regardless of who asks. You' ll notice that the ' pros' get stumped at times too, as shown by the posts in all of the forums. The reason we' re here is to assist other' s when they get stumped, and to ask for assistance when we get stumped. It' s called life. And I haven' t met a person yet who has all the answers.
_____________________________
"go forth and create."
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Front Page Includes - 9/17/2002 18:08:30
quote:
This question may sound stupid to the pro' s, but is there a need to put included pages in a _includes folder? If so, why? No, a page can be included from anywhere. It is really just a means of keeping things organised and clear. That is a great help when you revisit a site in the future - its amazing how foreign and strange the once familiar terriroty can have become! Its also a great help to anyone else who may have to take over the site in the future if directory names give at least a hint about what they contain. Sometimes though it can be advantageous to certain sites to organise things differently and there is no reason not to.
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
c1sissy
Posts: 5079 Joined: 7/20/2002 From: NJ Status: offline
|
RE: Front Page Includes - 9/17/2002 19:10:21
ok, i" m sort of getting it. I most likely have it, its just maybe giving it a name, lol. So basically what an include page is, You have a page that you have your information on, this goes on all the pages, and when you want to update the page, you use this particiular page? Therefore, this page is seperate from what you load into your site? Am I on the right track here? quote:
This question may sound stupid to the pro' s, but is there a need to put included pages in a _includes folder? If so, why? monstertrap, see my signature. lol, also look at some of my threads/posts. I think I have picked the perfect signature,   also welcome to the forums. charles, I was going to ask about the folder because I thought that I had read this elsewhere in here somewhere, but couldn' t figure out how to phrase the question. Nothing like just coming out and asking it!! Once again, thanks for the help!! appreciate it!
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://directory.css-styling.com http://fmsforum.com http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Front Page Includes - 9/17/2002 19:32:44
Pretty close!! quote:
So basically what an include page is, You have a page that you have your information on, this goes on all the pages, and when you want to update the page, you use this particiular page? Yep, that' s the idea. It need not go on all the pages, it can just go on the ones you choose. You can also have several includes on the same page. This diagram may make that a bit clearer. In this case you have three included on the same page - one for the header, one for the footer and one for the left navigation. So, if you ever wanted to change the navigation all you would have to change is the included page and each page in the site would be updated. quote:
Therefore, this page is seperate from what you load into your site? Not sure you have that. The include page, or pages, would have to be uploaded (or preferably published) with the rest of your site. What basically happens is this. A user requests a page on your site. The server looks at the page and sees the code for the include page in it. The server then finds the include page file, pops the content in in place of the code and serves up the page. Thus to the end user there is no indication that the include page is in anyway seperate, but it does need to be on the server before this will work. If it is not the server will be confused and will insert an error message where the include page code is. I hope I have not made it sound more complicated than it is! [:j]
Attachment (1)
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
c1sissy
Posts: 5079 Joined: 7/20/2002 From: NJ Status: offline
|
RE: Front Page Includes - 9/17/2002 20:41:14
ok, now let me see if I' m getting this now, the includes page is a seperate page, however, in order for your pages to display properly, the includes page needs to be loaded in as well. Now what doesn' t make sense, if each one of the pages has content on it, taken from the includes page, why would the includes page need to be there? So in essence you aren' t really displaying the page with new items, but the includes page has the items? scream, and i thought that I was getting it.  right now the light bulb is on dimmer, lol
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://directory.css-styling.com http://fmsforum.com http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Front Page Includes - 9/18/2002 7:57:15
I always think the best way to learn is to do. Just do it. Make a new site to play with, File>New Site, call it Playsite!! In this site open a new page and creat three tables in it, like in the image above, one on top of the other. Put any old rubbish into the ' main text' part of the page and save it as test1.htm. Now create a folder called ' includes' . Create and save three files in this folder. 1. Containing the single word HEADER in large text. Save as header.htm 2. Containing a list of words one below the other as a navigation might look. Call it navbar.htm 3. Containing in small text the sentence " Cissy made this page!" Now open your page test1.htm Place your cursor in the top table, do Insert>Component>Include Page and browse to the file header.htm. Select it and click ok. Place your cursor in the left cell of the middle table, do Insert>Component>Include Page and browse to the file navbar.htm. Select it and click ok. Place your cursor in the bottom table, do Insert>Component>Include Page and browse to the file footer.htm. Select it and click ok. Now preview this page. You will see that all your included files are appearing on the page. Save test1.htm. Then open it again and save it as test2.htm then change the main text to say something new. Save the page. Repeat and create a third page called test3.htm. Save it. Now open header.htm and change the word HEADER to THIS IS A NEW HEADER. Save it. Now open files test1.htm, test2.htm and test3.htm See what has happened? Play with this until you have your PING!!! moment - it will happen.
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
_gail
Posts: 2874 From: So FL Status: offline
|
RE: RE: Front Page Includes - 9/18/2002 8:04:54
You create a graphic and insert it into a page. You create an include page (just another regular web page), and insert it into a page (usually into a table on that page). You can insert the same include page into one or more pages (just like you can insert the same graphic into other pages). Change info on the include page, such as a link, and the change takes place on all pages where it is included. Maybe I missed it, but did you say what program are you using clsissy? gail
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Front Page Includes - 9/19/2002 10:04:22
quote:
on MY page which is called up by the include tag i have a javascript which then redirects to a THIRD page dependant on time and date... and with the INCLUDE function... it doesn' t work! That is because only the content in the include page between <body> and </body> is included in the final pages. Almost certainly you have put the JavaScript in the <head> </head> section of the include page so it will not be included. You have two options 1. Put the JavaScript after the opening <body> tag of the include page. 2. Put the JavaScript in the <head></head> section of the final page. Actually there is a third way too now that I think of it 3. Put the JavaScript in a seperate .js file and link to it from the final page. All will work, so choose whichever you prefer. Another point is that anything that is in the <body> tag itself in the include page, such as perhaps an ' onload()' or something, will need to be added to the <body> tag of the final page also.
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
dj chris
Posts: 5 Joined: 9/6/2002 Status: offline
|
RE: Front Page Includes - 9/20/2002 6:06:13
Thanks for the solutions Katherine! I' m sure i tried putting it in the <body> because i was aware of it not reading the <head> content, but i don' t think i copied the script in to the <head> of the final page so i will try that combination. When you say save the script as a .js file and then call it, could you tell me how as i have not done it this way before. Thanks! Chris
|
|
|
|
abbeyvet
Posts: 5095 From: Kilkenny Ireland Status: offline
|
RE: Front Page Includes - 9/20/2002 9:26:37
quote:
so i will try that combination Not sure doing both is a good idea! One or other should work. Is there an event handler in the <body> tag with this script? If so that will have to be in the body tag of the final page. To link to a JavaScript you just copy the script into a text file, remove the opening and closing script tags and save the file with a .js extension, so it might be called redirect.js Then on any page that needed to use the script you just put this in the head section: <script src=" http://www.yoursite.com/redirect.js" > </script>
_____________________________
Katherine :: InKK Design :: InKK Domains
|
|
|
|
dj chris
Posts: 5 Joined: 9/6/2002 Status: offline
|
RE: Front Page Includes - 9/21/2002 9:19:15
OK thanks a lot i will try that!
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Front Page Includes - 9/21/2002 9:30:24
Hi, Simply create a new web page. Type any text you like on top. Then insert web component, page, under the text. Select any page from your web or even http://www.yahoo.com. Browse your page and see the result. Include page is just inserting an existing page into a new page. Reasons can differ from one person to another. Regards Hisham
|
|
|
|
Momx4
Posts: 204 Joined: 2/22/2002 From: Seattle Area Status: offline
|
RE: Front Page Includes - 9/21/2002 12:17:25
quote:
ORIGINAL: c1sissy Could you please explain front page includes? thanks. How are the includes going? Are you just Doing it? I wish you lots of luck. A few months ago, I was going through what you are now. The light bulb really went on for me when I thought of includes as a group of information. Yes it is on a separate page, with a separate file name, but... Here is another example of how to use them and it might make it clearer. Lets say you want to include ;-) your business name and address (or whatever) within your site on many different pages, but lets say you will be changing your address in a few months. If you just type your name and address in each location you want it on your site, then when your address changes you will have to go to each page where your address appeared (if you remember) and and change the address or phone number or whatever has changed. WELL, if you create an include " page" with the name and address and phone number on it (lets say _include_address) then when the info changed you would change the address on the include page and it would be automatically changed on all the pages you included the include;-). Does that make sense? Hope this helps. I would also suggest searching other posts relating to includes here. There are lots.
_____________________________
Thanks, MomX4 The more I learn, The more there is to learn.
|
|
|
|
hhammash
Posts: 1064 Joined: 8/19/2002 Status: offline
|
RE: Front Page Includes - 9/21/2002 12:37:49
Hi, Nice clarifiaction and example Momx4. Regards Hisham
|
|
|
|
Jeremy Boone
Posts: 189 Joined: 9/26/2002 Status: offline
|
RE: Front Page Includes - 9/27/2002 8:32:00
I too am trying to learn about include pages. I am going to try abbeyvet' s exercise here shortly. My question is, when I create the tables in the new page1 and then in each cell insert the inlcude page, does that cell have to be the same size as the one in the include page? OR will it automatically resize the cell for me?
|
|
|
|
EWD
Posts: 1052 From: BeauFlow, NY Status: offline
|
RE: Front Page Includes - 9/27/2002 12:31:09
Jeremy- I generally make the table on my include page 100%, then on the page that uses the include I set the cell width I want. The included table will then use 100% of the specified width. Does that help? Work through the exercises and play a bit and you' ll get to that " AHA!" moment!
_____________________________
" I came here to ponder the futility of it all but I can see it' s useless."
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|