Php Content Management

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lisamarie_tt
Forum Commoner
Posts: 32
Joined: Fri Jul 15, 2005 8:20 am

Php Content Management

Post by lisamarie_tt »

Hi heres my problem

Description of Task:
I have to help manage the content of php pages by making the designer's work easier. Basically what I need to do is make the php code that populates the page easy to move around without killing the functionality of the page but changing the apperance.

Attempted Solution:
I tried making a meta-data tag system where the php code on the page would be replaced with a text equivalent simliar to that of HTML and saving it as a text file.
For example - echo $row["userName"]; would be replaced with <*convert>USER NAME<*/convert>This way the designer can move around the convert tag any where on his Html page and not have to worry about the php code. He can use the convert tag and any web design and not have to bother me with moving the code.
The txt file is fed into a parser and then converted to the php equivalent.

Problems With Attempted Solution:
1. Unsure how to handle looping with this scenario.
2. Solution becomes too invloved as the quering demands increase.
3. Very case sensitive (can be controlled i guess)

Major Questions:
1. Is there a simpler effective way to achieve what i am trying to do?
2. Do you have any suggestions on manipulation of loops in the current solution?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

looped sections are typically marked by start block and end block markers that the template engine pulls out and uses as the "source" of template data.

you may want to read the template engine thread currently active in the theory board.
lisamarie_tt
Forum Commoner
Posts: 32
Joined: Fri Jul 15, 2005 8:20 am

Post by lisamarie_tt »

I'm reading that thread now and i'm a bit lost :( do you have any sites or other resources that offer information on templating?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

We've had many many discussions about templating and template engines, so I'd like to defer to those instead of rehashing anything. I pulled 164 threads involving both templating and engines.

Search terms:
  • templat* engine*
Settings: "search for all terms" checked; everything else, default.

you could use Smarty.
Post Reply