Now let’s extend the default template. Create a new template in the administration, let’s call it HighlightThePeaks. We want to start with the default template, so click Add default template to insert the code, then save it.
If you refresh your macro, the result will still be the same because we only added the default template code by hand. But of course we wanted to enhance it. We specified a population range for our query like [55.000.000,85.000.000] (which includes countries like Germany, UK, France, etc.). In our new template, we’ll mark the peaks by setting two classes on the peak rows and add some styles depending on the value of $row.Population. The peaks are either “low” (lower than 60m) and “high” (higher than 80m). To visualize this, we set two background colors on the table rows with the respective classes.
Our new template looks like this. (Note that for the CSS styles we included the table's class "pocketquery-table". We need this to override the default aui table style - alternatively you could remove the class "aui" and style the table completely on your own.)