View Single Post
Old 10-15-2009, 09:17 AM   #1 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Display Framework

I've been building a website and have encountered a problem with the way i've designed it and looking for some advice. I have a class for managing basic html display such as headers, footers, main navigation etc and general stuff that will appear
on all pages. The problem i have is i am outputting these elements of the page by calling methods in my display class however between outputting the header stuff and the footer stuff sometimes depending on certain conditions i want to do
a page redirect i.e. if a user tries to access a page when they arent logged in i redirect to the index page. Problem is this requires a header re-direct and i've obviously already output html within the body of the document thus the header redirect
doesnt work. Obviously one solution is to not output the display elements such as main navigation etc but just build a page display object then print it at the end. Just wondered if anyone has any guidance or advice on how they've handled this?
captainmerton is offline  
Reply With Quote