I want to display sidebar navigation(left menu links) and content of each clicked vertical menu display on right side.
For example lets say I have this left menu:
Hello
to achieve this I would suggest the following:
- create a database that has each location and it’s description (data fields example : title - description)
- for the left menu -add a table and connected to this database with only one field (that is the title)
- for the right side -add a box that contains the text boxes
- now for the clicking event -add on row select event for the table that gets the selected location and queries the database based on it, then sets the result title and description as the text boxes text
here’s how it goes :
export async function table1_rowSelect(event, $w) {
//Add your code for this event here:
let location = event.rowData.title;
let result = await wixData.query("locations").eq("title", location).find()
let data = result.items[0]
$w('#text1').text = data.title
$w('#text2').text= data.description
}
useful documentations:
Best
Massa