Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7027085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:12:06+00:00 2026-05-28T00:12:06+00:00

I am building a CMS for editing page content. I would like to make

  • 0

I am building a CMS for editing page content. I would like to make it as flexible as possible, as each page will contain a variable amount of sections.

Currently, I have the following:

Table page:
===========
id
name

Table page_section:
===================
id
page_id
name
display_order

Table page_section_sub:
=======================
id
page_section_id
name
content

I thought this structure would work well, until I realised there is a lot of repetitive data and it’s not the ideal way to pull specific data out.

For example, the name field in table page_section_sub is meant to store the field label for the form. Here is a sample data:

Table page_section:
===================

id  page_id     name
-----------------------------------------
1   1           Slideshow Slide 1
2   1           Slideshow Slide 2
3   1           Slideshow Slide 3
4   1           Middle Box
5   1           Bottom Box


Table page_section_sub:
=======================

id  page_section_id name                content
------------------------------------------------------
1   1               Heading             ...
2   1               First Paragraph     ...
3   1               Second Paragraph    ...
4   2               Heading             ...
5   2               First Paragraph     ...
6   2               Second Paragraph    ...
7   3               Heading             ...
8   3               First Paragraph     ...
9   3               Second Paragraph    ...
10  4               Image URL           ...
11  5               Image URL           ...

Now on the front end I want to display the 3 slideshows and their related content from the above table. This is proving to be very tedious.

I know I can create another table with separate columns for “Heading”, “First Paragraph” and “Second Paragraph”, but as I mentioned I need this system to be flexible and take in to account any number of columns.

How can I improve the structure of this database so I can easily output this data on the front end and also modify it on the back end?

EDIT: This is what I want to do in my front end:

<?php while($row = mysql_fetch_array($slideshow)) { ?>
<div class="slideshow">
    <h1><?php echo $row['heading']; ?></h1>
    <p class="first"><?php echo $row['first']; ?></p>
    <p class="second"><?php echo $row['second']; ?></p>
</div>
<?php } ?>

But of course those actual $row columns don’t exist in the table.. In the back end however I need to be able to edit the above 11 rows on one page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:12:06+00:00Added an answer on May 28, 2026 at 12:12 am

    From your description it would seem like you could do it with just ‘pages’ and ‘content’. Im not sure why you have the ‘section_sub’.

    pages: 
       Page ID
       Content ID
       Content ID
       Content ID
       ...
    
    Content:
       Content ID
       Content Heading
       Content Text
    

    Each content row could have columns for “show heading”, “font”, etc

    EDIT: example data

    Content:
        ID0, Slide0 header, slide0 text
        ID1, Slide1 header, slide1 text
        ID2, Slide2 header, slide2 text
        ID3, RepetitiveHeader0, RepetitiveText0
        ID4, Repetitiveheader1, RepetitiveText1
        ID5, RepetitiveHeader2, RepetitiveText2
    
     Pages:
        Page0, Title0
        Page1, Title1
        Page2, Title2
    

    Now that Im looking at this – the way I have at the top (with multiple ContentID sections in the Page table) – is more of a NoSQL solution. You can accomplish the same thing in a MySQL solution by adding a table as follows:

      PageContent:
        PageID
        ContentID
        PageOrder
    

    Entries to build a specific page would be like:

      Page0, ContentID0, (order)1
      Page0, ContentID3, (order)2
      Page0, ContentID4, (order)3
      Page1, ContentID1, (order)1
      Page1, ContentID4, (order)2
      Page1, ContentID5, (order)3
    

    To build a specific page you’d select for the PageId joined to the PageContent then joined to the Content itself and order by PageOrder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building CMS like application. For example my BlogPost page contains several widget areas.
We're building a CMS. The site will be built and managed by the users
I'm going through the exercise of building a CMS that will organize a lot
I'm building a CMS which needs to manage content in english, chinese, and spanish
I am building a CMS that will support 7 different languages/cultures. For images that
I'm building some crude CMS-like functionality (to get acquinted with Play Framework). For this
I like taxonomies in Drupal and thinking about building a CMS on it for
I am building a small CMS for training content, on instruction of my client.
I am building a CMS kind of site, There will be lot of admin
I'm building a application (a CMS) where user can upload files like images. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.