Skip to content

5. Content Management

galaxygift edited this page Dec 4, 2022 · 2 revisions

Third part of admin in this section which contains pages that have something to show in site. It can contain something like blog, content, essay or news and etc. Site user can see and read this content and logged user can interact with content by commenting, rating and liking/disliking comments.

  • Content Categories:

    This part is for categorizing content based on their subject. In this section we can add, update or delete ContentCategory entity.

  • Contents:

    Each content belongs to a contentCategory. Contents are written in one language and if we have a site which is multilingual we should insert different content for each language. Main content of content entity gets from CkEditor. While inserting a content into database there are some flags that admin should set as belows:

  • Is Commenting Allowed ? : This flag specifies whether user can comment on this content or not, If it set to true then comment box will be showing in content page otherwise comment box wont be showing.

  • Is Rating allowed on? : this flag specifies whether end user can rate this content or not, Rating entities can shown with 5 stars for score 1 up to score5. The final score is calculated from average scores this entity has.

  • Is Slider Showing? : A content can have two types of images one from file upload of content images and another is from image upload in ckeditor, if content has any images which are uploaded from images file upload the default manner in site is to show these images in slider on top of the content page but if this flag is set to false then that slider wont be shown on content page.

  • Is sidebar contents showing beside this content? : : if this flag set to true a sidebar content that shows newest content in that selected category will show beside the main content in the content page but if this flag is set to false no sidebar content will be shown. Below two picture examples which is get from this cms are shown left one is preview of a content which “Is sidebar contents showing beside this content” is true and right one is false :

ContentExample

ContentExample

In Content Part we have a section for ease of use, First if site admin have a content to show to end user and inserted that content in this part after that has been planned to generate a product corresponding to that content then in this part can add extra fields for product insertion and insert a product corresponding to current content directly here.

Data in ckeditor:

in our application we use ckeditor to get data from site admin in several places, one of them is here in “/content/AddEdit” page where we get the main content of content entity. Html tags and style tags are allowed to be inserted in ckeditor but for security reasons some keywords and script tag and some other tags are not allowed to be inserted. The data in ckeditor would be checked before insertion to database and if it has any unsafe tags or keywords, data wont be inserted in database and admin user get invalid content error message. This functionality is the same wherever ckeditor is used for getting data in this application.

  • ContentComments:

    All comments that site users put on any contents can be seen here and can be approved by site admin to seen by other site visitors or not.