A question about the use of the smarty template engine is just learned about smarty. if I cannot express myself, I will draw two pictures to express my meaning. the homepage template should look like this: then, I will allocate data to the template, even if this page is finished. next is the article Template: then I still allocate data to the template. at this time, since all the data is allocated, I allocated the ranking part twice. what I want to change is only the list of articles and the article about the use of the smarty template engine.
I just learned about smarty and have some questions about the interoperability of the template engine.
If I cannot express myself, I will draw two pictures to express my meaning.
The homepage template should look like this:
Then, I will allocate data to the template, and the page will be completed.
Then there is an article template:
Then I still allocate data to the template.
At this time, since all data is allocated, I allocated the ranking part two times. what I want to change is only the content of the article list and content, however, if a template cannot be implemented, I have to write two templates. if I write two templates, I have to allocate the ranking part twice. this is a waste. how can this problem be solved? Please help me...
------ Solution --------------------
You can add the content on the right to a public page and include the two templates.
------ Solution --------------------
Is it a waste? No waste at all!
When you are still reading the list (Template 1), I am reading the article page (Template 2)
Can I show the rankings only to you instead of me?
------ Solution --------------------
The landlord is too cost-effective... I feel that it is too much and similar to the user experience is not good.