Questions about the use of the smarty template engine

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.