What is the difference between `tt_content` and` pages`

I am new to TYPO3 and I have one basic question, but I have not found an answer yet. What is the difference between pages and tt_content in TYPO3? And which one is better to use?

thanks

+5
source share
3 answers

Both are important tables in the TYPO3 system database.

  • pages - This table stores pages created by editors in the backend. The uid field stores the unique identifier of the page. The pid field (parent identifier) ​​refers to the parent page of the page. Most other fields can be edited in the page properties through the backend.
  • tt_content - This table stores content. This is arguably the most important table in the TYPO3 database. As in the page table, the uid field stores the unique identifier of the content element, and the pid (parent identifier) ​​field refers to the page on which the content element is placed. Most other fields can be edited from the backend in several types of content elements that TYPO3 provides. Note. Not every content item uses every field in this table.

The best use case is to leave the tables alone and not ruin their structure or integrity. They can be expanded with new fields if necessary, but they should always be handled with care.

It is also recommended that you periodically back up these tables (and the rest of the database).

+5
source

Pages are used to create the page tree.

Defining the page tree from the TYPO3 documentation:

The page tree represents the hierarchical structure of your pages. In most cases, this closely matches the navigation structure of your website. You can expand the page tree by clicking the small arrows on> to the left of the elements.

Content elements are just different types of content ... elements. In TYPO3 there are various types of content elements: - text - which allows you to insert only text - textpic - a combination of text and image with various combinations of layouts between text and image - files - allows you to upload files to your page - html - type of content element that allows you to insert simple HTML snippet

In the TYPO3 CMS, a content editor adds content to a page using various content elements.

For more information, visit the TYPO3 documentation website.


Database context

"pages" and "tt_content" are also table names in the CMS TYPO3 database. "pages" store information about a single page, and "tt_content" stores information about a single content item.


TypoScript Context

In TypoScript, "tt_content" is an object that represents the default rendering of a CONTENT object. Elements of paricular content, such as text or text, inherit some default settings from tt_content. Therefore, it is the parent of all content elements.

Read more about TypoScript and css_styles_content for more information.

+4
source

The "pages" table has a special status, which is the basis of the TYPO3 CMS, as it provides a hierarchical page structure in which all other TYPO3 CMS managed records are placed.

Standard pages are pretty fragmented pages of a website in an interface. But they can also be backend storage spaces very similar to folders on the hard drive. For any entry, the "pid" field contains a link to the page where this entry is stored. For pages, the "pid" fields behave like a link to their parent page. "

https://docs.typo3.org/typo3cms/InsideTypo3Reference/CoreArchitecture/Database/DatabaseStructure/Index.html#the-pages-table

In the tt_content table, you will find Content elements associated with the page table with the entry "pid".

+2
source

Source: https://habr.com/ru/post/1265739/


All Articles