Repeated html integration?, retrieving information from other html (novice)

Asked 2 years ago, Updated 2 years ago, 89 views

Now I know the ash code. I'm looking forward to hearing from the experts.

I'm thinking of a small homepage.

There are many elements whose addresses are linked to YouTube. For example, both the bottom menu and the main menu are linked to streaming addresses.

This is a structure in which multiple buttons on multiple pages are linked by the same link. By the way, I need to modify this link every week. It's so inefficient to change the elements on every page that there must be a way. I don't know. It's like a short code from WordPress. There's gotta be a way.

Also, The homepage I am using now is being built by purchasing a cheap preset, and each element is configured through div. It works within the page through division, but the problem is that the division contents of the map button in the main menu window must be inserted into all pages... In this case, in order to modify the map, we have to modify all the divs on all the pages. I think there must be a similar method to the above.

Help me with the beginner who is shoveling...

202.31.229.3 Please open it. Please let me know if you need any data.

Thank you.

div web-design html

2022-09-20 17:29

1 Answers

Oh, my God..

First of all, what you're talking about is a concept that's often called the template. It's a bit different from WordPress's short code, but it's similar in that it dynamically configures HTML responses.

Would you like to try the following in order?

1. The extension of all uploaded html files is .After correcting php, .html of each menu of the site is .Check if it connects well when switched to php.

If this step fails, to be honest, there is no answer.
Ask your NGINX server representative to enable PHP 7.0 or higher.

2. If (1 is successful), cut the main menu part of the problem anywhere and save it as _menu_main.php.

This fragment file is different .You will be rewritten from the php file.

3. Replace the main menu part of index.php and save it.

<?php include '_menu_main.php'; ?>

And when you open index.php again, check if the main menu pops up well.

Do you understand that index.php was originally index.html?
If it's well-knitted, you can write as many pieces as you want in this way. In theory, if you don't include each other, include can be as random as you like.
From here on, if you modify each piece once, it will be applied equally to all pages of include. This is what you want. If I have to put the term, it's a very primitive form of PHP template implementation.

4. Studying Code> made so far after installing Studying and installing .Add php files to the application/views folder and create a new site by creating a controller (and model).

You can approach it with the WordPress theme concept, but it seems like it will take a long time, and you said you bought a template, so I recommend Code Ignitor.

Just try it up to here for now.


2022-09-20 17:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.