Custom Tables Plugin

This Joomla plugin activates the functionality of Custom Tables Pro and includes additional features such as a plugin to insert Custom Tables Catalog records into any article or location where Content Plugins are enabled.

Custom Tables Catalog #

{customtablescatalog=Table Name,|Page Layout Name|,|Item Layout Name|,|Publish State|,|Filter|,|Sort by Field|,|Force Itemid|,|Limit|}
  • Table Name – Existing Custom Tables table.
  • Page Layout Name (Optional): Simple Catalog or Catalog Page layout to generate a catalog page.
  • Item Layout Name (Optional): Catalog Item layout used with Catalog Page only.
  • Publish State (Optional): Filter to show published or unpublished records or both (Options: showpublished, showunpublished, any)
  • Filter (Optional): ‘Where clause’ to extract specific records fulfilling a condition, and a limit clause for the number of records.
  • Sort by Field (Optional): Field name to sort by. To sort records in descending order add ” desc” after the field name.
  • Force Itemid (Optional): Used to set parameters for edit form or apply permissions.
  • Limit (Optional): Limit the number of records.

You can use the “_id” or “_published” keywords to order or filter by a record ID or publish status accordingly.

Examples: #

Insert records from the products table using the default layout:

{customtablescatalog=products}

Insert records from the products table as described in the List of Product layout, records must be published and the price more than 0, also sort records by name field:

{customtablescatalog=products,ListOfProduct,,published,price>0,name}

Insert records from the products table using the default layout and sort records by price field in descending order:

{customtablescatalog=products,,,,,price desc}

You can use Twig tags inside the parameter but enclose it with quotes. Insert published records from the countries table using the default layout where code field = ‘pa’, and limit the output to 5 records:

{customtablescatalog=countries,,,published,"code={{ 'p' ~ 'a'}}",,,5}

Custom Tables Record #

{customtablesrecord=Table Name,Field Name or Layout,Record ID or Filter}
  • Table Name: Existing Custom Tables table.
  • Field Name: Field Name or Layout like this “layout:layoutname”.
  • Record ID or Filter: 1,2,3 or a condition like “price>1”.

Examples: #

Insert a name of the country from the record with Id = 1:

{customtablesrecord=countries,name,1}

Insert a record from “purchases” table generated using “purchaseDetails” layout and where “user” = current user id:

{customtablesrecord=purchases,"layout:purchaseDetails","user={{user.id}}"}

Insert a name of the country from the record where “code” field = “US”:

{customtablesrecord=countries,name,code=US}

Tabs #

{tab:Tab 1 Title}Tab 1 content{tab:Tab 2 Title}Tab 2 content{/tabs}


What are your feelings

Leave a Reply

Updated on January 14, 2025