1 Page Containing Layout. Others Containing Text - Is there a way to do this?

free web hosting
Open Discussion > CONTRIBUTE > The Internet > Website Discussion

1 Page Containing Layout. Others Containing Text - Is there a way to do this?

Cerb
Even with PHP includes for menus and such, changing the layout of a site can be a big deal. Is there a way to have 1 page for the layout and multiple pages for the contents? The site in question can be seen here. All of the text inside the larger cell would be the contents.

That way I would just have to update the single page for layout, and it would be included into each of the separate content pages.

Does this make any sense to anyone else, or am I not explaining what I mean well enough?

Reply

truefusion
I think i know what you're talking about. If not then i'll try anyways. I'ma suggest using the get method.

CODE
/*
put this where you want the content from another page to show
*/
<?php include(&page.html); ?>
/*
if you want php pages to show just change $page.html to $page.php
*/


And in the uri you'd define $page by http://example.org/index.php?page=name_of_document

For multiple content values add a '&' after every value:
http://example.org/index.php?page=name&page2=name2

Hope this helped...

Notice from Johnny:
Fixed the code tags.

 

 

 


Reply

Cerb
Awesome! That's exactly what I was looking for. The only problem is finding a way to make the index page the same. I tried redirecting cerb.trap17.com to cerb.trap17.com/index.php?page=home.html, but for some reason the redirector didn't recognize question marks. Check out cerb.trap17.com if you don't get what I mean.

Reply

truefusion
Sorry, i dont understand what you mean, but your site seems to be running smoothly, so i'm guessing everything is ok now?

As for the contact page, i suggest not posting your email address like that, since there are web bots that surf the web for stuff like that. Thus bringing in spam.

I'd suggest making a php mail form with an anti-spam feature.

Reply

green fairy
Another option you may want to consider, is to use iframes. At DynamicDrive you can get a free script that creates an iframe that will resize with the content. You can specify the width of the iframe, and then the height adjusts to the length of the content that will be showed inside the frame, which means no iframe scrollbar. This works really well because you can't even see there's an iframe, and your layout won't have to reload every time you enter a new link. In that way, you only need one page for the layout, just like you wanted. You can keep the content separate from the layout. To simplify it even more, you could use one separate css file for your site's design and colour information. You can just link to your css file on each page of your site. It can be done like this in case you didn't know:
<link rel="Stylesheet" type="text/css" href="yourcssfile.css">
Hope this helps. Using this solution, it will always be an easy fix changing the design and layout of your entire site biggrin.gif

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Similar Topics

Keywords : 1, page, layout, text

  1. My First Website
    Where can i find useful web page templates? (3)
  2. Trap17 Registration Page Linkage Errors
    (2)
    Hello all, I am a new member to the forums, and hope I can be of service to you all. As I came
    across this hosting service I noticed a couple links on this page:
    http://www.trap17.com/forums/free-web-host...ation-t106.html The broken link is located in 2
    places where the "--> Register" link is under both here, REMEMBER :: No one is going to snatch
    away your account. So take your time, Relax and then post at the forums. Don't post in a hurry
    to simply get an Account. You will get it at any cost, provided you make GOOD posts. Get it in a
    good way. You are expe....
  3. Trap17 Flex Layout
    (0)
    After many weeks of ready, searching, googling, asking questions, coding minor debugging and some
    other stuff I have set up my first version of a trap17 portal application. Sad to say though that
    this sucker is loaded with errors and as has man browser related errors as well, but most liking
    stemming from the original error that I am at. Of course, the funny thing is that it works
    perfectly on my computer with obvious reasons since it is being locally tested, however I wanted
    this to be a desktop application and that way trap17 member would be able to have a trap17 po....
  4. Need Help With Flex Rich Text Editor Please!
    Im going mad because of the lack of flex support (0)
    Hi guys. a client wants a mailing list thingy, so im thinking i can use flex to give a really
    nice, slick interface... though for the money i should make her write raw HTML Grr.... Anyway. The
    point is making the RTE (rich text editor) is easy peasy But getting the HTML output seems
    impossible!!! I cant find any useful info on the abode site and all the tutorials i can
    find inviolve the use of a WYSIYG editor, but im writing raw mxml code here so thats no good. Ive
    made a plain text area that i click a button and it is filled with the text of the RTE, t....
  5. I Can't Find The Password Reset Page... [resolved]
    (5)
    I can't find the password reset page (I know it costs credits to request) Can anyone give me
    the link please to that page, it has other options too if i remember. Thanks....
  6. Cant Log Into Cpanel [resolved]
    Page cant be displayed (11)
    Help I can not log into cpanel. I just upgraded to IE-7 and now I can not get into my Cpanel. what
    the page is telling me is this. QUOTE Internet Explorer cannot display the webpage Most
    likely causes: You are not connected to the Internet. The website is encountering problems. There
    might be a typing error in the address. What you can try: Diagnose Connection Problems
    More information This problem can be caused by a variety of issues, including: Internet
    connectivity has been lost. The website is temporarily unavailable. The D....
  7. Best Text-based (mmo)rpg's
    (6)
    What are your favorite text-based mmorpg games?? If you done know what it is try google it. This is
    something that every1 should try out, it's a pirate game, the only one in it's kind. You can
    do lots of stuff really, try this link and find out;
    http://www.ruletheseas.com/index.php?r=149039 If you need any in game help try contacting me,
    punx08, and I might send you cash or something else /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" /> Quote from the homepage: "Yarg, a pirate game. Do what ye
    want. Mug, steal, kill, and m....
  8. My Ro Page
    (4)
    I designed my own website and code it xD this website is for my server JevilRO www.jevilro.com....
  9. Plot Page Help Invisionfree
    (0)
    I've made a few boards with invisionfree before, but I have no idea of what a plot page is or
    how to make one. can someone help me out?....
  10. Page Load Error When Trying To Get Into Control Panel
    I just changed domain (2)
    I had put a domain name that I didn't have when I registered my website. I got the 15 credits
    and changed it to a subdomain. Now I can't log into my control panel. At first it was telling me
    I had the wrong password which I'm sure I don't. Now I just get a timed out error. Also my
    confirmation email for changing my domain was kinda blank. QUOTE Hi, This mail is to notify
    you that your domain has been changed to : Regards, trap17.com So yeah... any help? EDIT:
    Also I don't see my request to change domain the proper forum I had attempte....
  11. Text Size In "fill-in" Form Blanks
    How do you change the size of the text in the fill in form entry boxes (2)
    Thanks for all the help on my previous question about adding an address to a "Submit" button.
    I've also been able to add a "print page" button through the help from group members. I now have
    another question. I've created a form using the Input commands that ask for name, address,
    state, etc. My computer is set to use 12 point text on a 800 x 600 screen resolution. When I hit the
    print screen button, everything is printed out fine, but I would like the information that people
    will be entering into the various boxes to be of a larger or bolder style. The whole re....
  12. Ad Text
    Setting up ads (2)
    Please, could anyone explain to me how to put up ad text, similar to the absence format by the sides
    of my blog.....
  13. Text Visualizer
    (1)
    look: http://wasteyourtimebot.com is a text visualizer with a robot, playing the piano. type in a
    text and you will see pictures relevant (or not) to your words... what do you think?....
  14. Php Linking
    Ned help to do this through a internal portal page. (2)
    OK I'm trying to create an internal php page to link to my main sites index.html page.
    Here's the code that's automatically generated when I click on the Create Php page link.
    CODE <?php /* Write code inserting output inside variable $content as in following
    example. You have DB connection, all global vars and all MKPortal and Forum functions at your
    availability */ $nome = $mkportals->member['name'];
    $content="Hi $nome"; So, how would I change this so it links to my sites
    index.html page? PS I....
  15. An Ode To Gmail.
    A small text about how GMail is awesome. (5)
    Everyone wanted a piece of the e-mail pie. Microsoft made a free e-mail service. Yahoo! made a
    free e-mail service. AOL did so too. Each with their goods and bads, their limitations and
    restrictions. Until the savior came. Google decided to do the smart move and make a revolutionary
    kind of e-mail. Starting off with their beta program that made use of invitations, many people
    (including me) found the truly amazing experience and the easy to use interface of GMail it's
    key points to lead the e-mail game. GMail kept spreading like mad. Then, account creation we....
  16. Problem Getting Text To Align With Different Resolutions
    (4)
    Hey! I just like fiddling around with making websites, and I'm working on one at the moment.
    However, while I can the text box to align on the designated area on the background image on my
    monitor, I'm well aware that with other resolutions and web browsers, it doesn't. (I use
    Firefox) A buddy told me to looks up some CSS but I'm not very good with it at all. What do I
    need to do to get it to centre regardless of the screen resolution the viewer uses? The website is
    optimized for 1280x1024 resolution in Firefox.....
  17. Web Page Designing
    (5)
    as a beginner how we can start to learn web page designing....
  18. PHP Function To Add Previous and Next Page Feature
    useful php function (5)
    CODE <?php function navigationbar($start_number = 0, $items_per_page = 50,
    $count) {    // Creates a navigation bar    $current_page =
    $_SERVER["PHP_SELF"];     if (($start_number < 0) ||
    (! is_numeric($start_number))) {         $start_number = 0;     }
        $navbar = "";     $prev_navbar = "";     $next_navbar =
    "";     if ($count > $items_per_page) {         $nav_count = 0;
            $pag....
  19. How To Make An Item Scroll With You On The Page.
    (10)
    ok im not sure where or how to really ask this... but you can find an example at
    http://www.demonoid.com the ad that is on the right side scrolls with you basically to the bottom
    of the page. I know they use an iframe but can you show me how that works or what makes it do that?
    i tried to copy the source and css but it did not work.. any advice?....
  20. Text Based Game
    (6)
    Is it possible to make a Text Based game with only HTML and some PHP for chat? I dunno any
    languages besides HTML. =.= yeah Im a newbie.....
  21. Web Page Layouts
    using Cascading Style Sheets (6)
    Here are a set of three Web pages I wrote a long time back when I was first starting to develop
    sites. The first one is a two columned page with a full length sidebar for navigation links. There
    are two that are identical except the sidebar positions are reversed. Another is "one way" to create
    a three column layout. And lastly, a 'framed' look on a page. These are not
    'fancy', you will need to look into the code and colourize it to suit, maybe set a width and
    centre it if you want, whatever... Please feel free to snag the source and develop the pages....
  22. What Program Do You Use To Design Your Web?
    Frontpage, Dreamweaver, a good text editor? (95)
    I personaly choose frontpage because its easy to use but.....I use dreamweaver for PHP.....
  23. Adding Shine To Text
    images say "Tiger Ads", but, the board is clsed, so, i'm r (4)
    OK, in this tut, I am going to show you how to add shine to any text. For this example I will be
    using the TigerAds affiliate button. (the board is since closed so, I'm not really advertising
    /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />) OK then,
    lets get started! 1. Open up the image that you will be using, this is mine: 2.
    Now that your image is open and making sure that its the .psd so you can edit the text on it. In
    your layers menu, hold down CTRL and click on the text layer so that only the te....
  24. Help In Ipb 2.1.6 Portal Page
    plaese help me (2)
    hi any 1 know how can a add my topics in ipb poratl page in my server i uploaded ipb 2.1.6 plaese
    tell me. like this site.....
  25. Google To Take On Geocities
    Google Page Creator (53)
    Well I just found out about a new webhosting service offered by Goolge, the highly imaginatively
    titled Google Page Creator, its your basic (ie not very good) free webhosting services, with the
    massive advantage of its name being preceded by the all powerful Google. I havent extensively used
    the service but I will atempt a brief overview of the service. The basic service consists of the
    usual what you see is what you get (WYSIWYG), which is allows novice users to create pages with no
    knowlegde of HTML (I'm sure you all know ho wthey work). It comes in the usual temp....
  26. Layout Size
    (10)
    anybody know what the size of a layout is so it fills the whole window.. is it 1024 x 800 or w/e it
    is? i've tried it before but when i publish it, you usualy have to scroll horizontally and i
    dont want that.. i want it to fit perfectly on the window.. (mke my sites on photoshop)....
  27. Problem With Page Redirect
    Help me out with this problem... (8)
    hey ppl, i just wanted a little help...i designed this website, but i want that if i click on
    certain link, it should open new page for few seconds and then browser should automatically redirect
    me to some other page....i tried this with header() function but i couldnt do the wait n redirect
    part, ... so somebody plz help.... -thanx in advance! Thanks Avalon, topic changed. ....
  28. Word Wrap Text In Div.
    (16)
    i use 2 div's for the page layout. One for navigation and one for the contents. html Code:
    Original - html Code: CODE    <div width="10%" style="position:
    absolute; left: 2%;">
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb </div> <div
    width="86%" style="position: absolute; left: 14%;"> bbbb </div>
    But now the b's wont stay within their div-element. I want lines that doesnt fit on one line
    within the divto wrap to the next line. How can i do this?....
  29. Button To Print Current Web Page
    (14)
    Hi, Does anyone know how to create a button that will printo out the current page. What I want to
    do is have the user fill out a form (containing name, address, zip, etc). They will then click on a
    "print" button and it will print out the form data. Any ideas? Thanks.....
  30. Php Unique Hit Counter
    Count page hits with php. (29)
    Hello all, Here is a neat and helpful PHP script that can count unique page views on your website.
    First you need to open up a new page in your text editor and paste in this code. CODE <?php
    $filename = "hits.txt"; $file = file($filename); $file =
    array_unique($file); $hits = count($file); echo $hits; $fd
    = fopen ($filename , "r"); $fstring = fread ($fd , filesize
    ($filename)); fclose($fd); $fd = fopen ($f....

    1. Looking for 1, page, layout, text

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for 1, page, layout, text

*MORE FROM TRAP17.COM*
advertisement



1 Page Containing Layout. Others Containing Text - Is there a way to do this?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE