Recap—Using CSP Tags
That's all we need to do for now on the TopPicks page, so let's recap what we've done, before we move on.
-
We used Studio to start our TopPicks page, adding and formatting some heading text (“Today's Top Picks”) and adding a table to organize our data into a row and column format.
-
Next, we added a predefined query to the Film class, to select and sort the data we're going to show on this page.
-
We then put a <csp:query> tag on the TopPicks page to use the query we just defined. We also inserted data elements returned by the query, using #( ... )# syntax, into our page.
-
We then added a <csp:while> tag to TopPicks to loop over the result set returned by the query and create a table row for each film.
-
Finally, we modified the SQL in our query so that it retrieves only the top 3 films as ranked by number of tickets sold.