473,698 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

template concept --help!

I've posted before but no one replied because I think it was confusing.
My problem is that I have a website where users have profile pages, and
they can each chooser their own (i.e. blogger.com) Point of this
question is...how can I make a system where template layouts (e.g, 3
column layout, 2 column, vertical, horizontal) can be created for it so
it's scalable and easy to make "templates" for? I just need some
concepts and methods of how to do this PLEASE!!!!!!!!! ! this is holding
up a project and i'm REALLYYY getting annoyed with it...

PLEASE give example code...the system I have now is kind of like
this...
/* SOME SQL QUERIES FOR THE $users array, and manipulation */
$t = new template;
$t->_template_pa th = $template_path; # /core/templates/blue/
$t->_template = $users['template']; # blue.template
$t->_css_file = $users['style_sheet']; # 'template.css'; etc
$t->_meta = $users['meta_tags']; # users keywords, etc
$t->_title = $users['title']; # title of page "Johns page" etc.
$t->_content = $users['content']; # contains the objects/modules they
want in the main body div
$t->_left_conten t = $users['left_content'] # left div content (if
turned on)
$t->_right_conte nt = $users['right_content'] # right div content (if
turned on)
$t->render(); # draw everything

inside the template class it basically just gets all the .template
files, arranges them in order does some queries and echoes them... I
need help, is this even a good idea? will this be way too slow? is
there a simpler way to do it? HELP!!!!!!!!!

Jan 26 '06 #1
12 1305
"they can each choose their own" They can choose their own TEMPLATES!
they can choose there own!

Jan 26 '06 #2
Another Idea I had was to have x amount of layouts...and then just .css
files for those layouts...aka choose your layout..choose your style.

Jan 26 '06 #3
bryan wrote:
Another Idea I had was to have x amount of layouts...and then just .css
files for those layouts...aka choose your layout..choose your style.


You're pretty right. Using markers or markups for layouting is
quite old and the current trend is using div based rendering and css
based layout. For the demo of the concepts visit
<http://www.mezzoblue.c om/zengarden/alldesigns/> (Note: only the css
file is changed for each layout, but not the HTML)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 26 '06 #4
bryan wrote:
Another Idea I had was to have x amount of layouts...and then just .css
files for those layouts...aka choose your layout..choose your style.


You're pretty right. Using markers or markups for layouting is
quite old and the current trend is using div based rendering and css
based layout. For the demo of the concepts visit
<http://www.mezzoblue.c om/zengarden/alldesigns/> (Note: only the css
file is changed for each layout, but not the HTML)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 26 '06 #5
d
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.com> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
bryan wrote:
Another Idea I had was to have x amount of layouts...and then just .css
files for those layouts...aka choose your layout..choose your style.
You're pretty right. Using markers or markups for layouting is
quite old and the current trend is using div based rendering and css
based layout. For the demo of the concepts visit
<http://www.mezzoblue.c om/zengarden/alldesigns/> (Note: only the css
file is changed for each layout, but not the HTML)


Getting that to work pixel-perfectly across browsers is a nightmare, though.
Javascript and css hacks are always required, which might not be what's
wanted...
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jan 26 '06 #6
What kind of hacks? how much? What way do you have around that?

Jan 26 '06 #7
bryan wrote:
I've posted before but no one replied because I think it was confusing.
My problem is that I have a website where users have profile pages, and
they can each chooser their own (i.e. blogger.com) Point of this
question is...how can I make a system where template layouts (e.g, 3
column layout, 2 column, vertical, horizontal) can be created for it so
it's scalable and easy to make "templates" for? I just need some
concepts and methods of how to do this PLEASE!!!!!!!!! ! this is holding
up a project and i'm REALLYYY getting annoyed with it...


Maybe you should use an existing system like Smarty. Save yourself the
work of documentation.

Jan 26 '06 #8
Smarty is it's own language...way too involved for what I need I need
fast, quick, effective and scalable (smarty is out althought it could
be all of the above, it's too much.)

Jan 26 '06 #9
d
"bryan" <te******@gmail .com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
What kind of hacks? how much? What way do you have around that?


CSS implementations vary greatly across browsers, far more so than HTML.
It's very easy to code pixel-perfect HTML that renders in Firefox, IE,
Safari, Opera, you name it. Try doing that with CSS without javascript or
underscore-hacks in your CSS, and you'll see what I mean ;)
Jan 27 '06 #10

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

Similar topics

2
1858
by: Rex_chaos | last post by:
Hi all, suppose A is an array. With the help of template function find_first_of and find_end, I got two desired elements of array. How can I tell the distance between these two elements?
2
1650
by: Jim West | last post by:
I have a template class (for numerical processing) that was originally written for real data that I need to extend to complex data, and I am running into a problem. The current version (greatly simplified) has something like template <class T> class FOO { T A; T B; };
2
1009
by: Dave | last post by:
Hello, Thanks for your help on the short problem shown below. Thanks! Dave #include <iostream>
2
1140
by: Dave | last post by:
Hello, Below, I have included a short program that does not compile. The problematic line is indicated with a comment. Comeau produces this error: "ComeauTest.c", line 19: error: type name is not allowed T::bar_t<int> local; ^ Please note that the answer is *not* to preface the offending line with "typename".
1
1477
by: suzy | last post by:
hi, i have created a aspx page template by creating a template.cs file which inherits from the page class. In this file I override the OnInit event and create a template in the form of a header, left menu and a footer. there is also a body area where the main content of the page will go. i created these 4 areas by dynamically creating a placeholder in each area at runtime. in the template.cs i load user controls into each area...
1
1049
by: scorpion53061 | last post by:
Hello, I have been asked to write a program and allow the end user to create custom fields in a SQL Server database in addition to the premade fields.
1
1600
by: Adnan | last post by:
Hi! I am newbie in template stuff and I am getting error for the following program #include "stdafx.h" using namespace std;
2
1917
by: martin | last post by:
Hello, Today I fetched the standard Access-2003 template "orders management db" from http://office.microsoft.com/en-au/templates/TC010185481033.aspx?pid=CT101426031033 In de openingform one sees a column "extended price" Perhaps I dont understand this too well, but shouldn't this be something like quantity*unitprice?
0
1953
by: resurgentnaveen | last post by:
Hi , I am trying to use Active Scaffold in my project and i need this template overriding feature of Active Scaffold. I am following the instructions on the link http://www.activescaffold.com/docs/template-overrides Could someone help me some piece of code for that Thanks in Advance
0
8683
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
9031
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
8904
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
8876
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
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
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
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
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

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.