Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

username's avatar

Different view up to different settings?

Hey,

I got problem with finding out the way to create main feature of my site.

I thought of creating let's say blog hosting, on which users are able to create their own blogs, with their own content etc., etc. The idea is pretty simple, and I can handle that part on my own.

However, I would like to make template system, so every user can set template for their blog. I also would handle that (i think), but let's say I would like to make users being able to edit css and html up to their needs. And here's where I need your help, guys!

I would like to hear your ideas on how to make it. Let's say on whole modification, so we can talk on the same level.

Thank you so much!

0 likes
4 replies
NoorDeen's avatar

you can make some standards like wordpress for your templates . the problem will be the user will need to be a developer or a designer with this approach .

1 like
username's avatar

that would do the job. However this would allow users to use PHP inside their skins.

I thought about making it in way like BigCartel.com does. So user got home.txt./.html (etc.) files, in which they got their HTML + tags like "{ example }", that are replaced with variables. However I don't really know how to implement it correctly. Because putting code like that into view file i don't think is good practice, as it destroys the MVC idea.

home = file_get_contents('example/path'); $this->home = str_replace('{ test.test }', $test, $this->home); ?>

{{ $this->home }}

NoorDeen's avatar
Level 6

you can use twig template engine it is secure for developer to allow designers to write them templates with it . and it is easy to use .

1 like
username's avatar

You basically answered my worries! Thank you!

One more question. How do you (or any of you, guys) think, where shall I store themes? User won't have FTP access to that, he just going to edit it with online-editor, so I'm not worrying about security sides, but...

Templates by itself are going to be stored in following structure: -Templates --{username} ---{template 1} ---{template 2}

Do you guys think I should store these in View or Public directory? And why?

Please or to participate in this conversation.