Skip to main content
AlfiSeptandhi
Participating Frequently
December 31, 2016
Answered

Make Auto Generate Content

  • December 31, 2016
  • 2 replies
  • 576 views

Hi, I have a question about website creation using Dreamweaver CC. So in this moment I'm developing a website using HTML in Dreamweaver. In this website there is a page called 'product', in this page there are some content such as image, description and specification. And the problem is I have to make about 30-50 product. It means I have to duplicate the product's html file and change the content 1 by 1.

I'm wondering, is there another way to make my job done easily? I mean I'm asking about something like an auto generate content. So what I should do is I just need to create 1 product page, and link it with some database file such as XML file or anything. In this XML there are exactly 3 column like the content in my page.

And the way it works is I just need to input data in an XML file and it'll auto generated HTML page with the content in my XML file, can I do that?

Thank you.

    This topic has been closed for replies.
    Correct answer Rob Hecker2

    You could certainly use an XML file, but more typically a MySQL database would be used and PHP would be used to call the data.

    It is normal these days for a website to have hundreds of "pages," yet really just a single "page" and all the content and layout variations are stored in a database or in files that can be pulled in as needed.

    So you would have a database table called, maybe, items. You would define the product name, type, price, weight, photo, description, and whatever else is relevant in this table.

    Then, on the website, you might have a page describing your product types, pages listing the items of a particular type (clothing, hardware, music, etc.) and then pages giving full product details.

    You can even have your inventory managed in the database and when a product is sold out, it will automatically become unavailable on the website.

    With such a website, without the database there would be no content in the website. No text and no photos. Just an empty shell.

    To create such a site requires knowledge of PHP, but these days you can forego that expertise and use an off-the-shelf CMS like wordpress along with plug-ins that provide product descriptions and shopping cart experience.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    December 31, 2016

    Do not use static HTML to build separate pages.  Before long your site will grow into a 10,000 lb gorilla that you will hate managing.   Build your site dynamically with PHP & MySQL.

    Do you plan to sell your products online?  Then you need a shopping cart attached to your product database.  Product Detail pages built in PHP are generated on the fly by your server with content stored in the MySQL database.   In addition, you'll need a backend CRUD system (create, read, update, delete) to manage product data, 

    If you want off the shelf solutions, look at WebAssist & Cartweaver eCommerce extensions for Dreamweaver.

    Adobe Dreamweaver Extensions for CS3 CS4 CS5 CS6 | WebAssist

    Cartweaver The Shopping Cart software that lets you be in charge.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    AlfiSeptandhi
    Participating Frequently
    January 1, 2017

    So its impossible to use HTML?

    Umm no I dont plan to sell it online, the website just show the product and if someone want to buy it, they have to call by phone.

    Nancy OShea
    Community Expert
    Community Expert
    January 1, 2017

    So its impossible to use HTML?

    Umm no I dont plan to sell it online, the website just show the product and if someone want to buy it, they have to call by phone.

    HTML alone does not DO anything.  It's merely a structure for displaying content.   In order to perform functions, you need the addition of server-side (PHP) or client side (AJAX) scripts. 

    I don't know what your business model is or what you're trying to sell.   But in my experience, people want instant gratification & the convenience of online ordering 24/7.   Or at a minimum, a reliable way to contact you online when they have questions.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    Rob Hecker2
    Rob Hecker2Correct answer
    Legend
    December 31, 2016

    You could certainly use an XML file, but more typically a MySQL database would be used and PHP would be used to call the data.

    It is normal these days for a website to have hundreds of "pages," yet really just a single "page" and all the content and layout variations are stored in a database or in files that can be pulled in as needed.

    So you would have a database table called, maybe, items. You would define the product name, type, price, weight, photo, description, and whatever else is relevant in this table.

    Then, on the website, you might have a page describing your product types, pages listing the items of a particular type (clothing, hardware, music, etc.) and then pages giving full product details.

    You can even have your inventory managed in the database and when a product is sold out, it will automatically become unavailable on the website.

    With such a website, without the database there would be no content in the website. No text and no photos. Just an empty shell.

    To create such a site requires knowledge of PHP, but these days you can forego that expertise and use an off-the-shelf CMS like wordpress along with plug-ins that provide product descriptions and shopping cart experience.

    AlfiSeptandhi
    Participating Frequently
    January 1, 2017

    If I want to use a XML and PHP to call the data, it means I should recrate the page using PHP instead of HTML page? And can you give me some ways or tutorial maybe, how to do that? Or the keywords? Maybe I'll search it by myself..

    BenPleysier
    Community Expert
    Community Expert
    January 1, 2017

    Please forgive me, but with the W3Schools example I merely wanted to point out that XML can be used as can CSV and JSON.

    However, like Rob and Nancy, I use PHP/MySQL.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!