Konstantin Teploukhov2018-01-30 09:33:26
Konstantin Teploukhov, 2018-01-30 09:33:26

Admin panel for a static site (mainly landing and business card sites 2-4 pages)?

Good afternoon .
I'm still green on the web, so my main job is to create simple turnkey static sites or their layout.
So, more and more often, customers need to be able to edit some elements themselves, such as a phone number, address, prices, etc. (mostly just text). And for this they ask to plant sites on WP but I think it's stupid that for the sake of 1 page you need to use wp which is sort of like for blogs.
So, I propose an alternative like TextoLite - they seem to be satisfied. But something made me want to write my own 'TextoLite' .
In theory, it should just change the text in tags like span , p , a . But how to implement it in general? The first thing that came to mind:
For example, I need to make it possible to edit the phone number that is located in the Admin through the same regular expressions looking for the desired tag and simply by str_replace they will replace the text. Is it correct ? Maybe there is somewhere in the internet (maybe some article on Habré) how is something similar created for static sites? so that without any databases there. (all of the above is green nonsense / don't hit me.) <a id="tel">8 (900) 888 99 88</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Velynder, 2018-02-10

You can make an admin panel in PHP, change these parameters there.
Store data in a file.
Read them from a file and assign them to a variable.
And on the page write something like<a id="tel"><?php echo $tel ?></a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question