Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

HTML managing static website with 100 or more pages, and no CMS

views
     
TShappy4ever
post Dec 12 2010, 07:49 PM, updated 15y ago

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


Hi guys

I need to know how one can manage a static HTML sites with alot of pages without the use of php/asp and cms.

I've thought of iFrames and server side includes. But other options?

Is it possible to create top horizontal drop down menus, left side menus and footer links via javascript/css and just provide a call function at the said location, so that any link updates I just need to update on the javascript/css file and not editing through tonnes of pages?

Can provide some guide/links for me to read up as well? Googling for so many things all over the place really leaves me rclxub.gif

Thanks.

i kasi free cium. wub.gif

This post has been edited by happy4ever: Dec 12 2010, 07:49 PM
ben.sip
post Dec 12 2010, 08:29 PM

Casual
***
Junior Member
439 posts

Joined: Apr 2010


using client side scripts seem feasible. You can also look at DHTML.
alien3d
post Dec 12 2010, 09:22 PM

Look at all my stars!!
*******
Senior Member
3,740 posts

Joined: Mar 2009
using json or xml data.javascript also have server side.
seanie
post Dec 12 2010, 11:13 PM

On my way
****
Senior Member
539 posts

Joined: May 2007
From: PD
If you want 'static HTML' because you can't do server-side scripting then you can use script elements to generate the page boilerplate on the client, but you'll have your work cut out to satisfy all user-agents (what if a browser has js turned off, or incomplete support?) and clients may not be able to save a meaningful document for viewing offline.

If it's only 100 pages or so, could you re-generate the content offline and then replace the previous content on the server? It sounds a bit suck, but it's basically similar to what a cache would do if you updated your server-side scripts on a dynamic web. How often are you likely to change the boilerplate? The great thing about doing it that way is that you just write your web using your normal server-side techniques, and then just use wget or similar to 'download' a static version of the web, which you then upload to the static web server (if you can't do it in one shot by using wget on the static version server).
wKkaY
post Dec 13 2010, 09:55 AM

misutā supākoru
Group Icon
VIP
6,008 posts

Joined: Jan 2003
The question is...

Why?
fenrir0402
post Dec 13 2010, 10:42 AM

Getting Started
**
Junior Member
195 posts

Joined: Apr 2010
if you use dynamic pages it would be easier, especially asp.net
TShappy4ever
post Dec 13 2010, 03:53 PM

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


i dont quite grasp what seanie is trying to say lol

its a client's security policy of not having any CMS running and prefer all to be in HTML.

i'm totally off with javascript, and i know it can be done with javascript controlling the menu which loads the iframes, its just that i basically suck in javascript, lol

so far not successful in getting as sample template with basic iframes for menu, footer, side navi. Heck, even my top menu seems to load another new page whenever i a href target on the iframe.
wKkaY
post Dec 13 2010, 04:18 PM

misutā supākoru
Group Icon
VIP
6,008 posts

Joined: Jan 2003
Who's going to maintain it in the future?

What seanie means is that you write the site in php or whatever you like so that you can develop rapidly. Then use a website mirroring tool to "export" your site into static HTML pages. Upload the static copy to the final destination. This may or may not meet your client's paranoia level.
redforest
post Dec 13 2010, 04:44 PM

Getting Started
**
Junior Member
59 posts

Joined: Jan 2003
seanie's suggested solution is probably most convenient as in updating the contents of your website, especially if it's updated frequently. Set up the cms on another port, and limit it to be accessible only by local ip's, everytime after you update the cms content, generate an updated copy of the cms as static html and you're good to go.
TShappy4ever
post Dec 13 2010, 05:22 PM

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


well, thats a new one!

Do a CMS, export it as static HTML, deliver.
But at this time, doing a CMS would mean double the work and duration. sigh.

i've got most of the iframes up, only problem is how to get the menu to highlight which iframe i loaded. any ideas?

And another problem is the darn IE6/7/8 compatibility....lol, but thats another headache. tongue.gif
alexa
post Dec 15 2010, 04:27 AM

Big Boss
******
Senior Member
1,456 posts

Joined: Jan 2009
From: mont kiara, kuala lumpur



if I were u, just use PHP zend framework to manage your static pages

it is easy to maintain
sunsuron
post Dec 15 2010, 12:41 PM

Regular
******
Senior Member
1,334 posts

Joined: Nov 2004



QUOTE(happy4ever @ Dec 13 2010, 05:22 PM)
well, thats a new one!

Do a CMS, export it as static HTML, deliver.
But at this time, doing a CMS would mean double the work and duration. sigh.

i've got most of the iframes up, only problem is how to get the menu to highlight which iframe i loaded. any ideas?

And another problem is the darn IE6/7/8 compatibility....lol, but thats another headache. tongue.gif
*
JavaScript + frames. Accessing DOM elements in frame/iframe is pretty straightforward and with the help of many JS framework out there, you can eliminate IE problems.

TShappy4ever
post Dec 16 2010, 02:02 AM

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


QUOTE(alexa @ Dec 15 2010, 04:27 AM)
if I were u, just use PHP zend framework to manage your static pages

it is easy to maintain
*
but the final delivery isn't in PHP, but html.

i've tried seanie's advice, and m looking at this: http://www.blogsdna.com/35/top-6-freeware-...ls-software.htm
which the purpose is to run a CMS and port these out into static sites using mirroring tools.

wget is too command prompt base, hard to use. I tried pagenest on SSI site, not too good. Lots of files/css/js not grabbed out.
Best is IE's .mht, but cant extract its files out.

QUOTE(sunsuron @ Dec 15 2010, 12:41 PM)
JavaScript + frames. Accessing DOM elements in frame/iframe is pretty straightforward and with the help of many JS framework out there, you can eliminate IE problems.
*
Thats the hard part. My javascript isn't good, and to use iframes, it would be like having 4 to 5 iframes within a site. Top menu, left menu, right menu and footer, and the top menu need to be highlighted when the main site is loaded. The javascript to manage these just gives me a headache sad.gif

I believe in seanie's post. To manage a static site needs to be in a CMS environment and port out to static format for the client. In house production ought to be independant of client deliverables. Problem here is the exporting part. Need to export the files in CMS to static aint easy.


alexa
post Dec 16 2010, 04:18 AM

Big Boss
******
Senior Member
1,456 posts

Joined: Jan 2009
From: mont kiara, kuala lumpur



just use PHP ZF
wKkaY
post Dec 16 2010, 07:43 AM

misutā supākoru
Group Icon
VIP
6,008 posts

Joined: Jan 2003
QUOTE(alexa @ Dec 16 2010, 07:18 AM)
just use PHP ZF
*
Perhaps you can elaborate why ZF is a suitable choice for the thread starter's problem.
TShappy4ever
post Dec 16 2010, 08:42 AM

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


QUOTE(alexa @ Dec 16 2010, 04:18 AM)
just use PHP ZF
*
but how do i export them into static files at the client's end, who do not run php?

hmm.gif
seanie
post Dec 16 2010, 09:44 AM

On my way
****
Senior Member
539 posts

Joined: May 2007
From: PD
QUOTE
wget is too command prompt base, hard to use.


CODE
wget --mirror http://staticsite1.localnet/


You won't need to do anything else with wget, that's all you have to do to create a static copy of the original web on your hard disk. Before you take that command for a test drive, make sure your target site is a very small one that won't mind you scraping it - wget doesn't check /robots.txt, so won't honour Disallows or Crawl-delays.


Added on December 16, 2010, 9:46 amOh and make sure your site doesn't use sessions - there's no counterpart in a static site. And no URLs created in javascript - wget won't see them (but then, nothing will for some kinds of client-side generated URLs).

This post has been edited by seanie: Dec 16 2010, 09:46 AM
wKkaY
post Dec 16 2010, 10:50 AM

misutā supākoru
Group Icon
VIP
6,008 posts

Joined: Jan 2003
wget won't be able to mirror some stuff, like css or javascript-referenced content. In addition you won't be able to mirror pages that aren't (transitively) linked from your home page.

I would recommend a wget mirror, then overlay it with the existing static files so that you are sure that you didn't miss anything.
AmpBuster
post Dec 16 2010, 04:36 PM

Getting Started
**
Junior Member
145 posts

Joined: Jul 2005
From: Johor Bahru, Johor, Malaysia


Something like that?

index.html
CODE
<html>
 <head>
   <script type='text/javascript' src='/test/js/jquery-1.4.4.min.js'></script>
   <script type='text/javascript' src='/test/js/jquery-ui-1.8.7.custom.min.js'></script>
   <script type='text/javascript' src='/test/js/common.js'></script>
   <style type='text/css'>
     @import url(/test/css/ui-lightness/jquery-ui-1.8.7.custom.css);
   </style>
 </head>
 <body>
   <div style='margin-left:200px;height:1200px;border:1px solid black'>page 1</div>
 </body>
</html>


common.js
CODE
var pages=[{
   url:'/test/test/page1.html',
   name:'Page 1'
},{
   url:'/test/test/page2.html',
   name:'Page 2'
},{
   url:'/test/test/page3.html',
   name:'Page 3'          
}];
$(function(){
 var menu=$("<div id='test'></div>").appendTo("body").css({position:'absolute',width:200,border:'1px solid black'});
 $(pages).each(function(){
   $(menu).append("<div><a href='"+this.url+"'>"+this.name+"</a></div>");
 });
 //float?
 //$(menu).css({top:$(window).height()/2-$(menu).height()/2,left:0});
 $(menu).css({top:8,left:5});
});


http://crayeo.com/test/test.html


TShappy4ever
post Dec 16 2010, 09:12 PM

(✿◠‿◠) Queen of Love ⎝⏠⏝⏠⎠
*******
Senior Member
7,194 posts

Joined: Jun 2005
From: Sanctuary of Paradise


haha that might just work, ampbuster, but looks complicated.

What i have found out that if SSI/PHP/ASP cannot be used, i can resort to simple javascript write.

Like placing a call function in the main site, and the .js file just document.write the html codes which acts like a seperate menu file. tongue.gif
No complicated javascript codes lol.

seanie, wget and most mirroring tools has their own downside. Alot of post-export processing need to be done to ensure the links/css/javascript work. Nowadays, most uses jquery and ajax effects, so it could be problematic.





2 Pages  1 2 >Top
 

Change to:
| Lo-Fi Version
0.0206sec    0.16    5 queries    GZIP Disabled
Time is now: 28th November 2025 - 12:11 AM