In the AJAX Panels tab of the Files panel, click the Content/AlbumDetail item in order to make it editable in the index master page. To retrieve detailed information about albums, you need data from both the artists and albums tables (so you need two recordsets).
Go to the Application panel, Bindings -> + -> Recordset (Query) to create the first recordset. Configure the window that opens as shown below:
Name the recordset rsAlbumDetails.
Select the conn_music_catalog database connection.
Select the album_alb database table to retrieve information about albums.
Select only three of the table columns, namely title_alb, release_year_alb, and cover_alb.
A filtering condition is needed: the value of the id_alb column should match the id_alb URL parameter.
There is no need for sorting the recordset.
If you press the Test button, you will be asked for a test value for the id_alb parameter. If a match is found, you will see the retrieved data.
Click OK to create the recordset.
Once again go to the Application panel, Bindings -> + -> Recordset (Query) to create the second recordset. Configure the window that opens as shown below:
Name the recordset rsAlbumAuthor.
Select the conn_music_catalog database connection.
Select the artist_art database table to retrieve the author of the current music album.
Select only the name_art table column.
A filtering condition is needed: the value of the id_art column should match the id_art URL parameter.
There is no need for sorting the recordset.
If you press the Test button, you will be asked for a test value for the id_art parameter. If a match is found, you will see the retrieved data.
Click OK to create the recordset.
Once the recordsets are created, continue with the instructions below:
Select the {DETAIL TITLE} default text. In the Bindings tab of the Application panel, expand the rsAlbumDetails recordset and drag and drop the title_alb column on top of the selected text.
Select the default image placeholder below the album title. In the Property Inspector, click the Browse for File button (folder icon) next to the Src text box and configure the dialog box that opens similar to here. The two differences are:
Select the cover_alb column from the rsAlbumDetails recordset.
Add content/albums/ right before the automatically added content in the URL text box.
Remove the default content below the image placeholder and create two new paragraphs there.
In the first one type "Author: " (without the quotation marks) and make it bold. Right next to it drag and drop the name_art column from the rsAlbumAuthor recordset.
In the second one type "Release year: " (without the quotation marks). Right next to it drag and drop the release_year_alb column from the rsAlbumDetails recordset.
To set a different HTML title according to the album you are viewing, proceed as explained here, with the difference that you need to select the title_alb column from the rsAlbumDetails recordset.
Save the index file, upload it to the server, and preview it in browser (press F12). If you now click the Matchbox Twenty item in the menu on the left, and then their More than you think you are album, this is how the page should look:
To complete the other Content states follow the steps below:
Click the default state of the Content panel and edit its content:
Remove the default content below the title.
Add some welcoming text instead of the removed paragraphs (e.g. "Dear friends, Check out the best music albums in my opinion. I owe each of these CD's and I guarantee you they are awesome!").
Click the Contact state of the Content panel and edit the default content:
Change the title to Contact.
Enter values for the phone number (e.g. 123-456-789) and e-mail address (e.g. suneclipse@mymusic.com).
At this point, the AJAX site with a music catalog of your favorite artists and albums is completed!