Results 1 to 2 of 2

Thread: Creating data-driven pages with Contao

  1. #1
    New user
    Join Date
    07-08-11.
    Posts
    1

    Default Creating data-driven pages with Contao

    Hello.

    I am brand new to Contao. I am considering using Contao for building my next site.

    My primary specific need with building my next site is to create data-driven pages. I am looking for any direction as to what tutorials or extras I should look at to create these web pages.

    Step 1 - Linking drop down boxes with existing tables

    I have tables with basic reference information such as Country, State, CompanyType, etc. I need to be able to link drop down boxes on a form to these tables so that the drop down box is populated with data from a field in these tables, and then the id field is captured and passed along for record submission.

    Step 2 - Allow admins / users to submit information

    Using a form a page would be created allowing users to submit data. Company name, address, products, etc. The data would be submitted as a record in a custom table.

    Step 3 - Dynamic page generation

    Each record in a table would represent a page that would need to exist on the site. A URL would need to be generated, and the page would need to exist so user comments can be added. If my site was about cars, the natural fields would include year, make and model. If the data was for a 2011 Chevy Corvette, then the URL would be /2011-chevy-corvette.php for the given page. The page would display the relevant data from the record.

    I am not experience with PHP nor MVC. I am looking to Contao or an add-on extension to handle the code. I can offer the information for establishing a database connection and provide table and field information.

    Does Contao offer the ability to manage user content in this manner out of the box so to speak? If not, is there a popular module or other code that can be added to allow for this type of use?

    I appreciate any wisdom or experience you are willing to share. Thank you for your time.

  2. #2
    User winanscreative's Avatar
    Join Date
    06-21-09.
    Location
    Massachusetts, United States
    Posts
    261

    Default Re: Creating data-driven pages with Contao

    Hey RyanKent- Here's some answers:

    Step 1 - Yes, you can, but it involves some minor coding. I am surprised that there is not an existing frontend widget that allows values to be pulled from a foriegnKey table, but if you keep reading I think you will find that it exists in the Catalog module.

    Step 2 - Yes, you can set up an form to post data to a table using the Form Generator. Simple name your fields the same as the columns.

    Step 3 - All of what you describe *sounds like* functionality that you could get from the Catalog module. It's one of the best ways to manage and display large sets of data. I would start there, but we warned that it is a very complex extension, but also very powerful. There is a learning curve involved, but once you get over that it becomes an essential tool that most Contao devs cannot live without.

    Hope that gets you started!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •