Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Content Box -- Technical Difficulties
Johnny
post Jun 16 2006, 01:41 AM
Post #1


[::Boy Wonder::]
***************

Group: Members
Posts: 2,098
Joined: 5-April 05
From: Costa Mesa, CA
Member No.: 5,294
T17 GFX Crew



Okay guys, I need a bit of help with my new template. I'm kind of a noob at coding, so right now I'm using dreamweaver to help me along, but anyway, I've developed this template:

IPB Image

which you can see in use (somewhat), here:
http://www.plusone.trap17.com/dev2/index.html

and I'm having a bit of trouble with the content box. I want the content box to automatically stretch to fit whatever is in it, (and have the navigation box stay unstretched) which I've managed to do with some tricky slicing, but the problem is that with the stretching, I seem to have two choices:

1. The content is in a specifically sized box, with scrollbars to view the content.
2. The content is in the same box, but it has no scrollbars, which causes either cutoff content, or extra space at the end.

Also, I want to be able to have the navigation links change the content of that content box, without having to change to a new page entirely. I'm not sure if this can be done without some fancy flash or javascript or whatever though.

EDIT: Okay, I took out the iframe, and left the content box in divs/tables, but is there any way to call the content from a different file, without having to include it all in the page or use iframes? And also, I still need the last part with the navigation links.
Go to the top of the page
 
+Quote Post
rvalkass
post Jun 16 2006, 07:27 AM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,118
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



You could load an external file into the main content box with a PHP include, if you don't mind some very simple PHP code. The only way to actually get the content to appear without changing page is with Javascript and something called Ajax, which is what GMail uses to load the pages.

You could use Javascript so that all of your content is on the page at the same time, but most of it is hidden. When you click a link you just change the properties of the different sections of text, so the current one becomes hidden and the new one is shown. This would eliminate any user that doesn't have Javascript enabled though.
Go to the top of the page
 
+Quote Post
Johnny
post Jun 16 2006, 08:26 AM
Post #3


[::Boy Wonder::]
***************

Group: Members
Posts: 2,098
Joined: 5-April 05
From: Costa Mesa, CA
Member No.: 5,294
T17 GFX Crew



QUOTE(rvalkass @ Jun 16 2006, 12:27 AM) *

You could load an external file into the main content box with a PHP include, if you don't mind some very simple PHP code. The only way to actually get the content to appear without changing page is with Javascript and something called Ajax, which is what GMail uses to load the pages.

You could use Javascript so that all of your content is on the page at the same time, but most of it is hidden. When you click a link you just change the properties of the different sections of text, so the current one becomes hidden and the new one is shown. This would eliminate any user that doesn't have Javascript enabled though.


Thanks a lot for the php suggestion, but now I'm not completely sure I want the single-page thing...

Reasons for:
I want to have a single main template that, if edited, changes those parts of the page for the entire site.
I want to have a single content box, that I can change to reflect different pages of content, so I only have to edit a page of content, rather than a page with the template -and- content.
I want to have my content box css coded.

Reasons against:
I don't want more code than necessary.
I'm not sure if the content box would stretch properly when it loads a different content page.
I could modify the main template for each page, if needed for special cases.
One less page to deal with.
I could use a seperate css file for the whole site.

Also, I modified the template a bit (well, completely redid it, really), with a toploaded nav bar. Here's the new version, I'm not sure which one I'll use, but it'll probably be this new one:
http://plusone.trap17.com/dev3/index.html
Go to the top of the page
 
+Quote Post
shadowx
post Jun 16 2006, 02:17 PM
Post #4


A clever man learns from his own mistakes, a WISE man learns from those of OTHERS
*********

Group: [HOSTED]
Posts: 986
Joined: 12-April 06
From: Essex, UK
Member No.: 21,719



i did this once too except abit lamer! what i did was the content was stored as a SEPERATE html file and numbered eg 1.htm or given a proper name if i could be bothered!

using php i just did something like this:

CODE
<a href=modules.php?mod=1>item 1</a>


then in the php file it was basically:

CODE
<?
$module = $_POST['mod'];
$module = "$module" + ".htm";
echo "<HTML>all the html stuff goes here <start content area>";
include($module);
echo "<end content area> finish html stuff </html>";
?>


there was more to it than that because of giving people access to only certain files but that is a basic way of doing it.

Your current html stuff from your template will go between the quotes where it says: echo" ";

and the "mod=1" will change to whatever the file name is, for example if the filename of the html file is friends.html it will be
CODE
<a href=modules.php?mod=friends>Friends</a>


i dont know if that made any sense i hope it did. its really not too complicated it might look it but thats just because its pretty untidy!
Go to the top of the page
 
+Quote Post
Johnny
post Jun 18 2006, 03:30 AM
Post #5


[::Boy Wonder::]
***************

Group: Members
Posts: 2,098
Joined: 5-April 05
From: Costa Mesa, CA
Member No.: 5,294
T17 GFX Crew



Sorry, doesn't make much sense at all. tongue.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Do You Need A Content Management System?(20)
  2. Content Of Post Removed!(6)
  3. What's The Best Content Management Software?(15)
  4. What Is The Human Tail? (graphical Content)(35)
  5. Downloading Content Using Rapidshare!(12)
  6. Internet As The Future Of Content Distribution(8)
  7. Script I Am Looking For(41)
  8. Need Layout Assistance: Content Area Is Not In Middle [resolved](14)
  9. Microsoft Encarta Or Wikipedia(5)
  10. Using Css To Hide Seo Content(9)
  11. Forum Content(0)
  12. 100% Height Issue With Stretching Top To Bottom - Full Page(5)
  13. Do You Want To Earn Money Via Your Wap Site?(0)
  14. Psychedelic Medicine(3)
  15. How Much Should Seo Cost For A Good Content Website?(6)
  1. Content Or Menu First In The Html?(2)
  2. Content Management System (cms)(10)
  3. Xml For Dynamic Website Content(3)
  4. Adsense Content(1)
  5. Does Duplicate Content Affects Search Engine Positions ?(1)
  6. Forum Database(9)
  7. American Troops At Their Worst. Videos Of What Our Soldiers Who Represent The Usa Are Doing In Other Countries.(10)
  8. Php--> Content-only Pages(9)
  9. How To Improve Analytical Writing (aw) Skills In Gre?(2)
  10. Sections And Content(3)
  11. Dreamweaver Cs3: How To Link Content To Layers/apdivs(5)
  12. Regarding Content Language...(6)
  13. Cms/upload Best Practice?(9)


 



- Lo-Fi Version Time is now: 8th September 2008 - 09:33 AM