Ordasoft website development company

Joomla CCK - SQL Entity

SQL Entity is an amazing new feature from Joomla CCK which can show data from database tables on website. Simply use SQL Language. Create SQL query to your database and get layouts with title, images and all data you need. You may show your data from database exactly as you need using Joomla CCK - Layout builder. Create layouts, forms, data lists, search forms or filters for search through your data.

You can create all types of websites. SQL Entity can help you to do many things with your website data. For example: to show data from any tables in your database or create any layouts and any types of forms from any tables on your website. And even show data from tables which already exist (Joomla article, Joomla Users). You may create self tables and show data from some external source (other database or websites)

sql entity - all type websites

Create SQL Entity

To create or edit SQL Entity you need to open Joomla CCK - Entities manager. Please click Joomla admin -> Components -> OS CCK -> Entities. Here you can create new SQL Entity, edit SQL Entity which is already exist or delete it.

sql entity - entities manager

To create SQL Entity you need to folow some simple steps:

  • 1. Press "Add" in Entities manager
  • 2. Select Entity Type: "Custom SQL Entity"
  • create sql entity step1
  • 3. Add Entity name, set SQL query, and validate SQL query.
  • create sql entity step2
  • 4. Load fields and select field type for every field. Check ID and Title impotant fields. ID - some unique field, we use to connect 1 row from database table to another. As example you can select data from 2 tables Users and User details and create 2 SQL Enteties: "Users and User details". Users enteies you can use to show the list of all users. User details - you use to show full details for every users. You can connect them with -ID- in both tables. Title - important to create URLs, form title and metatags.
  • create sql entity step3

Layout manager

All work with Entity Layouts and SQL Entity Layouts you do in Joomla CCK - Layout manager. Please go to Joomla admin -> Components -> OS CCK -> Layouts. Here you can create new SQL Entity Layout or edit SQL Entity Layout which is already exist or delete it.

sql entity - layouts manager

In Layout manager we have:

Buttons:

  • Edit - for editing layouts
  • Copy. This is a really useful button. When you need layouts that are alike for another layout. So simply copy layout which already exist and change some small peace.
  • Publish - publish layouts
  • Unpublish - unpublish layouts
  • New - create new layouts
  • Delete - delete layouts

Filters:

  • "Search" - to quickly search trough layouts. OrdaSoft Joomla CCK - gives you possibility to create unlimited layouts.
  • Select Layout type. Now Joomla CCK has possibility to create more then 20 different layouts types.
  • Select Entity. Show layouts for One Entity. On the website you may manage books, houses, cars, people etc. So you can have unlimited entities.
  • Select language. YES!!! Our Joomla CCK supports Joomla native multi language. Please check "Multi Language" features in Joomla CCK appear when you configure "Joomla multilingual".

Also Layout manager - Layout list you see columns:

  • ID - Layout ID. Need for unique identification of layout. You may see it in URL on frontend, at time Layout edit - when insert 1 layout to another, In module "CCK Layout show", At time create Menu Item to CCK Layout.
  • Title - Layout title.
  • Entity - Entity name for which layout was created.
  • Language. If there asterisk(*) - this layout for every language.
  • Published. There you can publish/unpublish layouts by one click.
  • Default. If layout set as default layout - we show it everywhere where layout is not selected. For Some Entity and some Layout type you may set only 1 layout as default.
  • Check out. This column shows if somebody edits this layout at same time. In his case you can leave this layout edit without press "Save" or "Cancel" buttons.
layouts manager - layouts list

Create SQL Entity Layout

To create or edit SQL Entity Layout go to Joomla CCK - Layout manager. Joomla admin -> Components -> OS CCK -> Layouts. Press "New". Here you see forms to select "Entity" and "Select Layout type". For every "Entity type" you can create diffirent "Layout type".

create sql entity layout

For SQL Entity you may create next Layouts:

  • Show All Instances - shows all rows from SQL query.
  • Show All Instances PDF - shows all row from SQL query in PDF format.
  • Show Instance - shows 1 row from SQL query. In this layout you may show detail info for every SQL query row and "short info". So "Show Instance layout" with "short info" you use in "Show All Instances layout" to show all rows.
  • Show Instance PDF - shows 1 row from SQL query in PDF format.
  • Show Parent-Child PDF - shows 1 row from SQL query as a parent and many child rows connected with this parent. As example you need to show User and all its goods, or users and all its posts, or a car and all its details where every detail is also can be a parent for next layout.
  • Search - layout where you may create Serach or Filter to do search thought your data.

There you may see more deatils about Joomla CCK Layouts and how use them.

Edit SQL Entity Layout

In edit area of SQL Entity Layout move to Joomla CCK - Layout manager.

There you see 3 areas, which permit to you create exactly what you want:

edit sql entity layout

For SQL Entity you can create next Layouts:

  • Left side. From there you drag fields, other layouts or modules and Drop to central area. Depend of Layout type the set of fields may differ.
  • Central area. There you create your layout. Set how your layout looks. Here you drop fields or other layouts from left side.
  • Right side. There you may manage settings for every field, row, block or form.

Show data from database tables on the Website

Layouts has created, so what is next? You may show data from database tables on the Website. To show your data on the website Joomla CCK has 3 methods:

  • Joomla CCK shows Layout module. With this module - you may show any joomla cck layout on frontend. So you may easily create "Joomla module" from any "Joomla CCK layout"
  • ordasoft joomla cck display layout module
  • Create Menu Item for any layout.
  • Add layout to Joomla article with the help of "joomla article - add cck layout" button
  • joomla article - add cck layout button

More details

If you have any question or suggestion write to our support.


»