All products Use one page (Template page) to generate the Product details page?

Source: Internet
Author: User
I have a lot of product thumbnails and I want to click on each thumbnail to open a page describing the product details.

How does this page generate different content based on different products?

I did it. Click on each thumbnail to open a larger version of each product, but how do you get a different description?

is not each picture corresponding product description content to use the database to save up? or save it with a TXT file?
And then open the thumbnail link to retrieve the appropriate description?

Ask for ideas. a novice.


Reply to discussion (solution)

One, each ID corresponding to the product data stored in the database.

Second, design a template

Third, obtain the corresponding information through the product ID fill in the template, output

1, like you said to save the data is necessary

2, you can open the thumbnail image when you bind each picture of the description of the content can also open a large map when you go to query

Well, that's the only way.

Thank you!

The database will be better, can be used jquery Ajax method, to the image of the onclick event, did not click once to request the database, and then return data (including the large image URL), displayed in the page

Of course to save to the database inside, through the ID query can be.

The database will be better, can be used jquery Ajax method, to the image of the onclick event, did not click once to request the database, and then return data (including the large image URL), displayed in the page

For beginners, don't talk about new knowledge that is too difficult for them.

In general this is the case. Each product must have data saved and each product has a unique ID value. Use this ID to search for content when you click on the thumbnail image.
Sql:
Select content from product where ' id ' = ' $id ';

  • 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.