Hi @Teodor, I’ve inserted the code below for the front end page app:
I’ve also pasted the server connect further below
<!doctype html>
<html>
<head>
<base href="/usr/">
<script src="../dmxAppConnect/dmxAppConnect.js"></script>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="../bootstrap/5/css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/style.css" />
</head>
<body is="dmx-app" id="a32x_sop">
<dmx-serverconnect id="sc_list_sop" url="../dmxConnect/api/list_sop.php"></dmx-serverconnect>
<section>
<div class="container">
<div class="row" is="dmx-repeat" id="rp_MainSection" dmx-bind:repeat="sc_list_sop.data.rp_mainsection">
<h1>{{a32xSop_MainSection_id+' '+a32xSop_MainSection_text}}</h1>
<div id="rp_SubSection" is="dmx-repeat" dmx-bind:repeat="qr_subsection">
<h5>{{a32xSop_SubSection_id+' '+a32xSop_SubSection_text}}</h5>
<div id="rp_Title" is="dmx-repeat" dmx-bind:repeat="qr_title">
<h5>{{a32xSop_Title_text}}Title</h5>
<div id="rp_Item" is="dmx-repeat" dmx-bind:repeat="rp_subsection[0].rp_title[0].qr_item">
<p>{{rp_title[0].qr_item[0].a32xSop_Item_text}}Item</p>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="../bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>
</html>
The server connect below:
<?php
require('../../dmxConnectLib/dmxConnect.php');
$app = new \lib\App();
$app->define(<<<'JSON'
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "sort"
},
{
"type": "text",
"name": "dir"
}
]
},
"exec": {
"steps": [
{
"name": "qr_mainsection",
"module": "dbconnector",
"action": "select",
"options": {
"sql": {
"type": "SELECT",
"columns": [
{
"table": "a32xSop_MainSection",
"column": "*"
}
],
"table": {
"name": "a32xSop_MainSection"
},
"primary": "a32xSop_MainSection_id",
"joins": [],
"query": "SELECT *\nFROM a32xSop_MainSection",
"params": []
},
"connection": "a3sop"
},
"meta": [
{
"type": "number",
"name": "a32xSop_MainSection_id"
},
{
"type": "number",
"name": "a32xSop_MainSection_order"
},
{
"type": "text",
"name": "a32xSop_MainSection_text"
}
],
"outputType": "array"
},
{
"name": "rp_mainsection",
"module": "core",
"action": "repeat",
"options": {
"repeat": "{{qr_mainsection}}",
"outputFields": [
"a32xSop_MainSection_id",
"a32xSop_MainSection_order",
"a32xSop_MainSection_text"
],
"exec": {
"steps": [
{
"name": "qr_subsection",
"module": "dbconnector",
"action": "select",
"options": {
"sql": {
"type": "SELECT",
"columns": [
{
"table": "a32xSop_SubSection",
"column": "*"
}
],
"table": {
"name": "a32xSop_SubSection"
},
"primary": "a32xSop_SubSection_id",
"joins": [],
"wheres": {
"condition": "AND",
"rules": [
{
"id": "a32xSop_SubSection.a32xSop_SubSection_MainSection_id",
"field": "a32xSop_SubSection.a32xSop_SubSection_MainSection_id",
"type": "double",
"operator": "equal",
"value": "{{a32xSop_MainSection_id}}",
"data": {
"table": "a32xSop_SubSection",
"column": "a32xSop_SubSection_MainSection_id",
"type": "number",
"columnObj": {
"type": "integer",
"name": "a32xSop_SubSection_MainSection_id"
}
},
"operation": "="
}
],
"conditional": null,
"valid": true
},
"query": "SELECT *\nFROM a32xSop_SubSection\nWHERE a32xSop_SubSection_MainSection_id = :P1 /* {{a32xSop_MainSection_id}} */",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{a32xSop_MainSection_id}}"
}
]
},
"connection": "a3sop"
},
"meta": [
{
"type": "number",
"name": "a32xSop_SubSection_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_MainSection_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_order"
},
{
"type": "text",
"name": "a32xSop_SubSection_text"
}
],
"outputType": "array",
"output": true
},
{
"name": "rp_subsection",
"module": "core",
"action": "repeat",
"options": {
"repeat": "{{qr_subsection}}",
"outputFields": [
"a32xSop_SubSection_id",
"a32xSop_SubSection_order",
"a32xSop_SubSection_text"
],
"exec": {
"steps": [
{
"name": "qr_title",
"module": "dbconnector",
"action": "select",
"options": {
"sql": {
"type": "SELECT",
"columns": [
{
"table": "a32xSop_Title",
"column": "*"
}
],
"table": {
"name": "a32xSop_Title"
},
"primary": "a32xSop_Title_id",
"joins": [],
"query": "SELECT *\nFROM a32xSop_Title\nWHERE a32xSop_SubSection_id = :P1 /* {{a32xSop_SubSection_id}} */",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{a32xSop_SubSection_id}}"
}
],
"wheres": {
"condition": "AND",
"rules": [
{
"id": "a32xSop_Title.a32xSop_SubSection_id",
"field": "a32xSop_Title.a32xSop_SubSection_id",
"type": "double",
"operator": "equal",
"value": "{{a32xSop_SubSection_id}}",
"data": {
"table": "a32xSop_Title",
"column": "a32xSop_SubSection_id",
"type": "number",
"columnObj": {
"type": "integer",
"nullable": true,
"name": "a32xSop_SubSection_id"
}
},
"operation": "="
}
],
"conditional": null,
"valid": true
}
},
"connection": "a3sop"
},
"meta": [
{
"type": "number",
"name": "a32xSop_Title_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_id"
},
{
"type": "number",
"name": "a32xSop_Title_order"
},
{
"type": "text",
"name": "a32xSop_Title_text"
}
],
"outputType": "array",
"output": true
},
{
"name": "rp_title",
"module": "core",
"action": "repeat",
"options": {
"repeat": "{{qr_title}}",
"outputFields": [
"a32xSop_Title_id",
"a32xSop_Title_order",
"a32xSop_Title_text",
"a32xSop_SubSection_id"
],
"exec": {
"steps": {
"name": "qr_item",
"module": "dbconnector",
"action": "select",
"options": {
"sql": {
"type": "SELECT",
"columns": [
{
"table": "a32xSop_Item",
"column": "*"
}
],
"table": {
"name": "a32xSop_Item"
},
"primary": "a32xSop_Item_id",
"joins": [],
"wheres": {
"condition": "AND",
"rules": [
{
"id": "a32xSop_Item.a32xSop_Item_Title_id",
"field": "a32xSop_Item.a32xSop_Item_Title_id",
"type": "double",
"operator": "equal",
"value": "{{a32xSop_Title_id}}",
"data": {
"table": "a32xSop_Item",
"column": "a32xSop_Item_Title_id",
"type": "number",
"columnObj": {
"type": "integer",
"nullable": true,
"name": "a32xSop_Item_Title_id"
}
},
"operation": "="
}
],
"conditional": null,
"valid": true
},
"query": "SELECT *\nFROM a32xSop_Item\nWHERE a32xSop_Item_Title_id = :P1 /* {{a32xSop_Title_id}} */",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{a32xSop_Title_id}}"
}
]
},
"connection": "a3sop"
},
"meta": [
{
"type": "number",
"name": "a32xSop_Item_id"
},
{
"type": "number",
"name": "a32xSop_Item_Title_id"
},
{
"type": "text",
"name": "a32xSop_Item_order"
},
{
"type": "text",
"name": "a32xSop_Item_textPrefix"
},
{
"type": "text",
"name": "a32xSop_Item_text"
},
{
"type": "text",
"name": "a32xSop_Item_action"
},
{
"type": "text",
"name": "a32xSop_Item_notes1"
},
{
"type": "text",
"name": "a32xSop_Item_notes2"
}
],
"outputType": "array",
"output": true
}
}
},
"output": true,
"meta": [
{
"name": "$index",
"type": "number"
},
{
"name": "$number",
"type": "number"
},
{
"name": "$name",
"type": "text"
},
{
"name": "$value",
"type": "object"
},
{
"name": "a32xSop_Title_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_id",
"type": "number"
},
{
"name": "a32xSop_Title_order",
"type": "number"
},
{
"name": "a32xSop_Title_text",
"type": "text"
},
{
"name": "qr_item",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_Item_id"
},
{
"type": "number",
"name": "a32xSop_Item_Title_id"
},
{
"type": "text",
"name": "a32xSop_Item_order"
},
{
"type": "text",
"name": "a32xSop_Item_textPrefix"
},
{
"type": "text",
"name": "a32xSop_Item_text"
},
{
"type": "text",
"name": "a32xSop_Item_action"
},
{
"type": "text",
"name": "a32xSop_Item_notes1"
},
{
"type": "text",
"name": "a32xSop_Item_notes2"
}
]
}
],
"outputType": "array"
}
]
}
},
"output": true,
"meta": [
{
"name": "$index",
"type": "number"
},
{
"name": "$number",
"type": "number"
},
{
"name": "$name",
"type": "text"
},
{
"name": "$value",
"type": "object"
},
{
"name": "a32xSop_SubSection_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_MainSection_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_order",
"type": "number"
},
{
"name": "a32xSop_SubSection_text",
"type": "text"
},
{
"name": "qr_title",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_Title_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_id"
},
{
"type": "number",
"name": "a32xSop_Title_order"
},
{
"type": "text",
"name": "a32xSop_Title_text"
}
]
},
{
"name": "rp_title",
"type": "array",
"sub": [
{
"name": "a32xSop_Title_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_id",
"type": "number"
},
{
"name": "a32xSop_Title_order",
"type": "number"
},
{
"name": "a32xSop_Title_text",
"type": "text"
},
{
"name": "qr_item",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_Item_id"
},
{
"type": "number",
"name": "a32xSop_Item_Title_id"
},
{
"type": "text",
"name": "a32xSop_Item_order"
},
{
"type": "text",
"name": "a32xSop_Item_textPrefix"
},
{
"type": "text",
"name": "a32xSop_Item_text"
},
{
"type": "text",
"name": "a32xSop_Item_action"
},
{
"type": "text",
"name": "a32xSop_Item_notes1"
},
{
"type": "text",
"name": "a32xSop_Item_notes2"
}
]
}
]
}
],
"outputType": "array"
}
]
}
},
"output": true,
"meta": [
{
"name": "$index",
"type": "number"
},
{
"name": "$number",
"type": "number"
},
{
"name": "$name",
"type": "text"
},
{
"name": "$value",
"type": "object"
},
{
"name": "a32xSop_MainSection_id",
"type": "number"
},
{
"name": "a32xSop_MainSection_order",
"type": "number"
},
{
"name": "a32xSop_MainSection_text",
"type": "text"
},
{
"name": "qr_subsection",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_SubSection_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_MainSection_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_order"
},
{
"type": "text",
"name": "a32xSop_SubSection_text"
}
]
},
{
"name": "rp_subsection",
"type": "array",
"sub": [
{
"name": "a32xSop_SubSection_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_MainSection_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_order",
"type": "number"
},
{
"name": "a32xSop_SubSection_text",
"type": "text"
},
{
"name": "qr_title",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_Title_id"
},
{
"type": "number",
"name": "a32xSop_SubSection_id"
},
{
"type": "number",
"name": "a32xSop_Title_order"
},
{
"type": "text",
"name": "a32xSop_Title_text"
}
]
},
{
"name": "rp_title",
"type": "array",
"sub": [
{
"name": "a32xSop_Title_id",
"type": "number"
},
{
"name": "a32xSop_SubSection_id",
"type": "number"
},
{
"name": "a32xSop_Title_order",
"type": "number"
},
{
"name": "a32xSop_Title_text",
"type": "text"
},
{
"name": "qr_item",
"type": "array",
"sub": [
{
"type": "number",
"name": "a32xSop_Item_id"
},
{
"type": "number",
"name": "a32xSop_Item_Title_id"
},
{
"type": "text",
"name": "a32xSop_Item_order"
},
{
"type": "text",
"name": "a32xSop_Item_textPrefix"
},
{
"type": "text",
"name": "a32xSop_Item_text"
},
{
"type": "text",
"name": "a32xSop_Item_action"
},
{
"type": "text",
"name": "a32xSop_Item_notes1"
},
{
"type": "text",
"name": "a32xSop_Item_notes2"
}
]
}
]
}
]
}
],
"outputType": "array"
}
]
}
}
JSON
);
?>