Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 700923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:33:08+00:00 2026-05-14T03:33:08+00:00

(Summary: My users need to be able to edit the structure of their dynamically

  • 0

(Summary: My users need to be able to edit the structure of their dynamically generated web pages without being able to do any damage.)

Greetings, ladies and gentlemen. I am currently working on a service where customers from a specific demographic can create a specific type of web site and fill it with their own content. The system is written in PHP.

Many of the users of this system wish to edit how their particular web site looks, or, more commonly, have a designer do it for them. Editing the CSS is fine and dandy, but sometimes that’s not enough. Sometimes they want to shuffle the entire page structure around by editing the raw HTML of the dynamically created web pages.

The templating system used by WordPress is, as far as I can see, perfect for my use. Except for one thing which is critically important. In addition to being able to edit how comments are displayed or where the menu goes, someone editing a template can have that template execute arbitrary PHP code.

As the same codebase runs all these different sites, with all content in the same databse, allowing my users to run arbitrary code is clearly out of the question.

So what I need, is a dumbed-down, idiot-proof templating system where my users can edit most of the page structure on their own, pulling in the dynamic sections wherever, without being able to even echo 1+1;.

Observe the following psuedocode:

<!DOCTYPE html>
<title><!-- $title --></title>
<!-- header() -->
<!-- menu() -->
<div>Some random custom crap added by the user.</div>
<!-- page_content() -->

That’s the degree of power I’d like to grant my users. They don’t need to do their own loops or calculations or anything. Just include my variables and functions and leave the rest to me.

I’m sure I’m not the only person on the planet that needs something like this. Do you know of any ready-made templating systems I could use?

Thanks in advance for your reply.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:33:09+00:00Added an answer on May 14, 2026 at 3:33 am

    I’d recommend Twig.

    http://www.twig-project.org/

    Particularity it’s sandbox mode.

    Secure: Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a templating language for applications where users may modify the template design.

    As far as something that’s as extremely simple as your example, why not just write a simple class to parse your templates? I don’t think there’s actually anything as super simple as you’ve requested being maintained and distributed as it’s not very hard to write something up to do it.

    Only other thing I can possibly think of is maybe mustache? Though I think it’s PHP implementation is pretty early in development and I’m not sure how stable or usable it is at the moment.

    http://github.com/bobthecow/mustache.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Summary : I need to authorize pages based upon the data present in the
I need to update existing users IsApproved status in the aspnet_Membership table. I have
I have two tables on MySQL, with this structure: Users: id | name Accounts:
Summary: I want to be able to run a query against an external database
I need to be able to flush a single entity to the DB during
Summary I want to write a .png file as quickly as possible, without a
I would like to allow users to post HTML to a site but need
I am following this article to authenticate users of a Web API service I'm
I'm solving a quiz and need some advices. a summary of the quiz follows:
I am setting up a custom tab where users can view and edit data.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.