473,786 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best Practice - Constant Page Layouts

Hello Everyone:

I am in search of an easier way to develop pages. My most current
website, www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!

Apr 2 '07 #1
13 1820
In article <11************ **********@l77g 2000hsb.googleg roups.com>,
ju************@ gmail.com says...
Hello Everyone:

I am in search of an easier way to develop pages. My most current
website, www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!

I think its probably fair to say you are already doing it.
There was also once a concept of "frames" which would address your
reloading blink question - but they seem to have gone out of fashion -

I don't know why - perhaps someone could enlighten me (us) on why just
for curiosity?

Andy
Apr 2 '07 #2
Justin.Voelker wrote:
Hello Everyone:

I am in search of an easier way to develop pages. My most current
website, www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!
Even a template will have to hit the server for every page load, even if
it is the same layout. The only way you could stop that is to save the
page outputs as html files and just load the static pages.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 2 '07 #3
On Apr 2, 12:13 pm, and...@blueyond er.com wrote:
In article <1175529378.263 026.220...@l77g 2000hsb.googleg roups.com>,
justin.voel...@ gmail.com says...
Hello Everyone:
I am in search of an easier way to develop pages. My most current
website,www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!

I think its probably fair to say you are already doing it.
There was also once a concept of "frames" which would address your
reloading blink question - but they seem to have gone out of fashion -

I don't know why - perhaps someone could enlighten me (us) on why just
for curiosity?

Andy
Andy:

I once used frames and you are right, they seem to have been killed
off. I just didn't know if a template system would achieve the same
sort of results without being so terribly coded as they are right
now. Thanks for the response though!

Apr 2 '07 #4
On Apr 2, 1:17 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelker wrote:
Hello Everyone:
I am in search of an easier way to develop pages. My most current
website,www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!

Even a template will have to hit the server for every page load, even if
it is the same layout. The only way you could stop that is to save the
page outputs as html files and just load the static pages.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Jerry:

Do you know of any nice, simple, light-weight php template systems
(unline smarty and it's massive amount of files). Thanks!

Apr 2 '07 #5
Justin.Voelker wrote:
On Apr 2, 1:17 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>Justin.Voelk er wrote:
>>Hello Everyone:
I am in search of an easier way to develop pages. My most current
website,www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom() " that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!
Even a template will have to hit the server for every page load, even if
it is the same layout. The only way you could stop that is to save the
page outputs as html files and just load the static pages.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

Jerry:

Do you know of any nice, simple, light-weight php template systems
(unline smarty and it's massive amount of files). Thanks!
Sorry, I don't use templates.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 2 '07 #6
There isn't a whole lot out there besides smarty, and you've already
said you don't like it (although it does have built-in caching to
speed up rendering, if you want it). I personally don't like smarty
because it just feels like an unnecessary scripting language on top of
another scripting language.

I still wanted to be able to separate business logic from display
logic, though, so came up with my own homebrew quasi-templating
system. I based in around the CSS Grids component of the Yahoo YUI
library (http://developer.yahoo.com/yui/grids/). It's basically just
a collection of a few classes that wrap around the css components of
that library, so I can just create a page, add blocks/grids/units,
give them whatever data they need, then just call Render() and it
takes care of structuring the html. The end result being absolutely
no html or display logic in the main file as it's delegated out to the
individual page elements. Crude, yes, but it gives me both the level
of flexibility and abstraction that I like.

Point being, that if Smarty isn't doing it for you, you may want to
think about what exactly you want from a templating system and then
just go do it yourself. The nice thing about your own templating
system is that once you have it, you'll get a lot of miles out of it
because you'll be able to reuse it for just about anything else you do.

Apr 2 '07 #7
an****@blueyond er.com wrote:
In article <11************ **********@l77g 2000hsb.googleg roups.com>,
ju************@ gmail.com says...
>Hello Everyone:

I am in search of an easier way to develop pages. My most current
website, www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom( )" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!


I think its probably fair to say you are already doing it.
There was also once a concept of "frames" which would address your
reloading blink question - but they seem to have gone out of fashion -

I don't know why - perhaps someone could enlighten me (us) on why just
for curiosity?

Andy
At least one reason I know of is the problems search engines (were said
to) have (had?) with indexing framed pages. Another one has to do with
frames being reopened in new tabs/windows messing up the site's layout.

Personally I still don't mind using the occasional iframe here and there
where the alternatives imply a LOT of extra work. Shoot me, I've always
been a lazy programmer. A trait I've been more often praised for in this
line of work than not.

Anyone else the definitive answer to andy's question?
Sh.
Apr 3 '07 #8
Justin.Voelker wrote:
Hello Everyone:

I am in search of an easier way to develop pages. My most current
website, www.Base2WebDesign.com, has the exact same layout throughout
the entire site. Right now I use a function called "page_top() " and
page_bottom()" that , when called, display the tops and bottoms of
pages. All I have to do on the actual index.php page is call those two
functions and then write the main content on that page. This seems
stupid but it seems to work. I would like to use templates but I
don't know much about them and I have yet to find anything that just
screams simplicity to me and ease of use. If anyone could point me in
the right direct for developing pages that have a consistent layout
with dynamic content on the "main section" of the page, I would be
forever grateful. Again, I would like to use templates because from
what I have seen they look like they are what I need. Can anyone
direct me toward and very simple, straight-forward, easy-to-use
template system (if this is what I indeed would need) that could speed
up the rendering of the pages without hitting the server on each page
load for the same page layout? Also, my current way of building the
page may be to fault but might there be a solution to the pages
"blinking" when you switch from one pages to the next for the first
time. When you return to that same page there is no blink. Thank you
so much to anyone and everyone that can solve any of the problems I
have listed above!
What will templates give you that you cannot do simpler with PHP ?

I have CubeCart in my store and they implemented some weird macro
language in their templates. Why not PHP files ?

Just compare the snippet:

<!-- BEGIN: cat_img -->
<img src="{IMG_CUREN T_CATEGORY}" alt="{TXT_CUREN T_CATEGORY}"
border="0" title="{TXT_CUR ENT_CATEGORY}" />
<!-- END: cat_img -->

With PHP representation

if(cat_img)
{
echo "<img src='$ImgCurren tCategory' alt='$TxtCurren tCategory'
border='0' title='$TxtCurr entCategory' />";
}

Roman

--
www.dipmicro.com - My Electronic Component and Project Store
www.findspec.com - My Electronic Component Datasheet Search Engine
Apr 3 '07 #9
On Apr 2, 8:28 pm, Schraalhans Keukenmeester <bitbuc...@inva lid.spam>
wrote:
and...@blueyond er.com wrote:
I don't know why - perhaps someone could enlighten me (us) on why just
for curiosity?
Andy

Anyone else the definitive answer to andy's question?
Sh.
I always thought that frames were a no-no because they broke url
navigation. For example, the user could be a few clicks deep in a
frameset, but the url stills says www.xyz.com. When they make a
bookmark expecting it to take them to that deeper level, it just takes
them back to the main page.

Of course, AJAX now causes essentially the same problem, but
apparently it's a lot cooler than frames were, so it can get away with
it?

Apr 3 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
2478
by: Peter A. Schott | last post by:
I've got a file that seems to come across more like a dictionary from what I can tell. Something like the following format: ###,1,val_1,2,val_2,3,val_3,5,val_5,10,val_10 ###,1,val_1,2,val_2,3,val_3,5,val_5,11,val_11,25,val_25,967,val_967 In other words, different layouts (defined mostly by what is in val_1, val_2, val_3). The ,#, fields indicate what "field" from our mainframe the corresponding value
24
5277
by: delerious | last post by:
Hi, I am designing a web site that will that showcase a bunch of vacation pictures. It will have a banner and a navigation menu (consisting of 13 rectangular images that can be clicked). I am considering a few different layouts: - Banner on top, with the navigation menu immediately below it. The problem with this layout is that the menu would be about 770 pixels wide, since there are 13 items in it. Many users would have to...
7
1892
by: Hostile17 | last post by:
I'm trying to arrive at a kind of "industry standard" or "best practice" approach to CSS for a policy document aimed at developers, but not necessarily very experienced developers. What does the CIWAS community think is the best way to go about styling documents for maximum compatibility/minimum problems with old browsers. We have a range of people currently using a range of techniques, i.e.
145
8861
by: Mark Johnson | last post by:
Oddly enough, I found it difficult, using Google, to find a list of best-of sites based on the quality of their css packages. So I'd ask. Does anyone know of particularly good sites which are in good measure because of their creative and useful css designs? I'm aware of Zen Garden and a few others. So don't bother with those. And I hope I don't get replies from people with a 'tin ear' and no design sense. Good sites. Good pages. That's...
16
2235
by: Jonas Smithson | last post by:
I'm going to say something now that may seem to completely contradict a previous post of mine, in which I basically said that taking a "who cares" attitude about certain browsers (because of their non-standard CSS rendering) makes no sense. Well, you have to draw the line *somewhere*... and contradictory or not, I've decided that I've suffered with Netscape 4 for long enough. Coding workarounds for its brain-dead CSS rendering has...
4
2314
by: Will Hartung | last post by:
The designers have handed me a page that has 5 different blocks on it in the center column (in a typical 3 column layout with page spanning headers and footers). The blocks have elaborate headers (large images), and small content areas that will hold little blocks of text. Currently, I have this done with pixel specific tables within tables within tables, using the images as backgrounds of the repseective TD's.
136
9458
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
2
1320
by: Ethan V | last post by:
I have about 50 string constants that I put all of them in one file. I find that it's too un-organized because I have to intellisense thru lots of unrelated constant to get to the one I want. Is there a best practice for organizing constant? Please share with me your thoughts and experiences. Thanks so much in advance.
4
1841
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is logged in, on each and every page, and redirects the user to a login page if s/he's not logged in. The login page will also take care of some standard setup, such as choosing/populating a user profile. I used to use <!-- #include ... --for this,...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.