ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Data Driven website pages with EE

July 07, 2011 1:09pm

Subscribe [6]
  • #1 / Jul 07, 2011 1:09pm

    RyanKent

    5 posts

    Hello.

    I am brand new to EE. I am considering purchasing your CMS 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 believe this need is a somewhat basic and standard need for a website. I have the ability to do this using php but I prefer to do it in a CMS for numerous reasons. One of those reasons is my lack of experience with php, so I would mostly be copying the code given to me out of a book. Another is the need to ensure security and to stay updated.

    Does EE 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 / Jul 07, 2011 2:49pm

    Rob Allen

    3114 posts

    Hi RyanKent welcome to the forums!

    An official answer will be along shortly so this is from an EE regular.

    EE sounds like a good fit for your project, managing and manipulating different data sets is what it excels at doing.

    Step 1 - Linking drop down boxes with existing tables

    Two ways to do this:

    a) using a comprehensive search feature based on keyword and specific info fields for things like year, manufacturer etc
    b) using “dynamic parameters” where you allow the user to select the criteria from one or more form controls (select, radio buttons, checkboxes etc) and display the filtered results

    Step 2 - Allow admins / users to submit information
    Yes Admins can add content, you can also have different member groups that can access the control panel but only have access to certain parts.

    You can accept front end submissions from your visitors or site members using the (included) Safecracker addon.

    Step 3 - Dynamic page generation
    I’d suggest using EE’s natural URL logic, so for your example you might have /2011/chevy/corvette as the path. Depending on how you want to structure your data you could also do /chevy/2011/corvette or /chevy/corvette/2011

    Hope that helps!

  • #3 / Jul 07, 2011 6:58pm

    RyanKent

    5 posts

    Thank you for the reply bluedreamer.

    Your reply causes me to be concerned that EE is NOT able to perform these tasks. I was hoping for simple “yes” answers along with links to sites with live examples, and links to pages on this site which describe functionality. Instead your explanation described other things that EE could do.

    Hi RyanKent welcome to the forums!
    Step 1 - Linking drop down boxes with existing tables

    Two ways to do this:

    a) using a comprehensive search feature based on keyword and specific info fields for things like year, manufacturer etc
    b) using “dynamic parameters” where you allow the user to select the criteria from one or more form controls (select, radio buttons, checkboxes etc) and display the filtered results

    I do not desire “searching” in any form. Neither am I interested in radio buttons, checkboxes or other controls.

    For a “choose country” field there would be a list of 100+ countries. The controls you mentioned do not work well for this function. A drop-down box or otherwise scrollable list would be needed.

    Step 2 - Allow admins / users to submit information
    Yes Admins can add content, you can also have different member groups that can access the control panel but only have access to certain parts.

    You can accept front end submissions from your visitors or site members using the (included) Safecracker addon.

    I understand admins and users can add content. That is a basic function of every CMS every created. I also understand the content can be controlled with permissions. Again, I have never heard of any CMS that cannot perform that function.

    My specific question is, can the system allow the content to be submitted as a record in a custom table? Using the “cars” example, there would be a cars table where each record represented a specific car. So record id 1 could show “2011” in the year field, “Chevrolet” in the make field, and so forth.

    Step 3 - Dynamic page generation
    I’d suggest using EE’s natural URL logic, so for your example you might have /2011/chevy/corvette as the path. Depending on how you want to structure your data you could also do /chevy/2011/corvette or /chevy/corvette/2011

    That is not the URL path that I requested, and I would not be willing to use EE if that was the result. I am looking to have 100% control over the path generated. I definitely would not desire such a deep folder structure, but rather a flat structure. /2011-chevrolet-corvette would be the URL. Ideally it would be auto-generated based on the criteria I establish. There needs to be a means I can establish the URL in code /[year]-[make]-[model]/

    Also, the page would need to be auto-created based on the record being created. The page would not exist, an admin would add information for the 2011 Chevy Corvette via the process described in step 1 & 2, then the page would be created based on the record existing.

    That page would then be accessible by anyone, and users can add comments to the page.

    I apologize if the needs were not clear in the original message. I am designing this site for a non-profit organization and need to get it right.

  • #4 / Jul 08, 2011 12:05am

    Marcus Neto

    1005 posts

    RyanKent,

    Welcome to the forums. It sounds like you are familiar with database structure and programming semantics. If you are more comfortable in setting up tables and specific structure then CodeIgniter may be better suited for you.

    ExpressionEngine is meant to handle the heavy lifting for those that do not want to create special tables of content. EE allows users to create channels. Channels are really just buckets for content. You can also create custom field groups with a single or many custom fields assigned to a group. By associating these Field Groups to Channels you create the CMS in such a way that it handles the data that your site needs vs generic text boxes that require the content be formatted in them for display.

    But you have some pretty specific needs. CodeIgniter would give you the control that you desire and give you a set of functions that you can use as a starting point.

    If you change your mind and you want to hear more let me know. I would be happy to answer any additional questions.

  • #5 / Jul 08, 2011 7:34am

    RyanKent

    5 posts

    Thank you for the reply Marcus.

    I am an experienced MS DBA and database developer. My application experience is from VBA and the MS Office suite. I only began learning HTML and CSS this year and I have no experience with php nor MVC principles. This is why I seek a CMS.

    What I desire is a CMS to do all the coding work. I looked at Code Ignitor and it is clear I would need to learn PHP and MVC prior to being able to use it effectively. I foresee multiple problems including security issues and functionality problems based on my lack of knowledge in these areas.

    In MS Excel or Access, it is an easy matter to associate a drop down box with a field from a given table. It is simply a matter of specifying the database connection parameters along with the table name and field name. I seek a CMS that offers this same functionality. I know the db connection parameters along with the table information, but I don’t know the php code associated with this process.

    The same idea follows with step 2 of the process I shared. I would offer a field name such as “Make” or “Model” and then entered data should be applied to a new record in a table, and a given field. Once again I have no idea of the php code involved, the MVC principles, nor do I really wish to learn the steps for this project. I seek a CMS that will write the code or otherwise provide this functionality.

    Step 3 is once again the same as above with respect to my knowledge, and the functionality I seek. The entire point of a CMS for me is to cover the gaps in my PHP and MVC knowledge.

    Can EE do this? If not, is there any add-on software packages that extend EE in such a way that this can be done? If not, do you know if Code Igniter or any other CMS would best fit my needs?

  • #6 / Jul 08, 2011 5:36pm

    Marcus Neto

    1005 posts

    RyanKent,

    The difference is slight. You mention wanting to interact with the DB directly. That would be a no no when working with any CMS and not just EE. But if you can work through the CMS then just about anything is possible with EE. For instance:

    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.

    I believe that there is an add-on on Devot-ee for adding countries to a field or Category. But again, you would have to work through the CMS and not just directly in the DB. It’s difficult for me to provide much more information as you are not really saying what the end goal is. If you want me to provide more pointed responses I can.

    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.

    Yes. Easily done using SafeCracker which is our module for created Stand Alone Entry (or edit) forms.

    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 believe this need is a somewhat basic and standard need for a website. I have the ability to do this using php but I prefer to do it in a CMS for numerous reasons. One of those reasons is my lack of experience with php, so I would mostly be copying the code given to me out of a book. Another is the need to ensure security and to stay updated.

    Does EE 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 still think you can get the URL structure that you want. But it may have to be entered in as the title of the entry vs just building that on the fly. I don’t know of any CoTS CMSs that would allow you to build pages dynamically without having an entry associated.

    Comments are standard EE functionality.

    You may want to check over on Devot-ee.com as well to see what add-ons may be helpful for this build out. With close to 1000 add-ons it can be a bit overwhelming for us to try and keep up with all of them.

    I hope this helps.

  • #7 / Jul 08, 2011 9:02pm

    RyanKent

    5 posts

    Thank you for the detailed reply Marcus.

    The “Country” table was just an example. The specific project involves setting up a non-profit site which evaluates other companies. The short background is we presently have no idea where our “natural” products are manufactured. When you buy Ginseng or an all-natural weight-loss supplement, we often see the product name and maybe a distributor name on the bottle. This non-profit group will work to gather feedback from visitors, and establish connections between the manufacturer, importer, distributor and retailers. When we hear a news story about how a product was tampered with, the site will attempt to identify other products which may be affected.

    To this end my need is to create a page allowing users to fill out information as follows:

    Company Name
    Country
    State / Region
    City / District
    Postal code
    Address
    Company type (manufacturer, importer, distributor, retailer, etc)
    Website
    Notes

    I do not need to normally interact with the data directly. I would seek to run reporting, which can be done with a read-only account. Otherwise it seems faster to just build the CompanyType table manually rather then building a web page interface, as that table will rarely if ever be modified. If that is a problem for the CMS, I could go ahead and just build a page to update that table.

    So the needs would be as I outlined:

    Step 1 - link drop down boxes for the CompanyType, Country and other fields to drop down boxes so information is restricted and consistent.

    Step 2 - allow approved users to submit data, and the information would be stored in a single record in a database table

    Step 3 - if a “retailer” record was created for “Acme Natural Foods” then a new webpage would be available on the site with a URL /retailers/Acme-Natural-Foods. The page would contain a list of collected information on the retailer, along with the opportunity for users to add comments to the page.

    If a retailer had more then one location, then the main page for that retailer would appear with a link to a page that allows users to search for a specific location. Some companies, GNC for example, have literally 1000+ locations so a drop down box would not be workable.

    This same process would be used for other aspects of the site. For example, when entering in information about herbs such as “Ginseng”, a user can enter in all the information, then a /herbs/ginseng page should be made available on the site.

    If EE can help build pages in this manner, then I will happily download the CMS and begin using it immediately.

  • #8 / Jul 11, 2011 6:31pm

    Brandon Jones

    5500 posts

    Hi RyanKent,

    I don’t foresee any problem with 1 and 2. As Marcus said, 3 might be a little tricky when it comes to setting up the “multiple location” functionality, but with some clever templates EE might just do what you want out of the box. A custom add-on is always a possibly as well. No CMS is going to do exactly what you want without some custom logic or code, whether it’s in a front-end template or a PHP add-on.

    I think it’d be well worth your time to invest in a seasoned pro to help make sure you get this implemented as cleanly and flexibly as possible. EE is a really powerful system and we want to see you get the most out of it.

  • #9 / Jul 14, 2011 7:37pm

    OsamaBinLogin

    2 posts

    Honestly, EE is pretty deep and powerful, as you can see from the complexity of the answers you’ve gotten here.  Yes it ‘can do’ everything you asked for, but so can C++, where you would have EVEN MORE control over the result. 

    Sounds like you need less power, less learning curve, and more of an off-the-shelf, canned solution. 

    With EE, you’ll be writing a fair bit of HTML/CSS yourself, plus the special magic EE tags and what not - maybe more than what you’re looking for.  CodeIgniter is lower level, like an app server, and you’ll definitely have to write PHP for that.

  • #10 / Jul 14, 2011 9:45pm

    RyanKent

    5 posts

    Thank you both for the feedback.

    I am presently looking at Joomla + Seblod plugin. It seems to be able to do everything I need. I am also looking at the K2 plugin which is similar to Seblod.

    I was unfamiliar with EE prior to this research so I am glad I had a chance to learn about this CMS. If it wasn’t for my particular need in this instance I would definitely consider using EE.

  • #11 / Jul 15, 2011 9:33am

    Sue Crocker

    26054 posts

    RyanKent - it sounds like you have made your decision. Is there anything we can assist you with further?

  • #12 / Jul 15, 2011 9:40am

    RyanKent

    5 posts

    No, thank you for the honest and complete information.

  • #13 / Jul 15, 2011 10:44am

    Sue Crocker

    26054 posts

    Perhaps we’ll see you again down the line for another project. 😊 If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases