From 589dfbf9cead6b70e25a99cc180bd5c230f4afb0 Mon Sep 17 00:00:00 2001 From: "Mark Tyers (aa7401)" Date: Sat, 2 Nov 2019 16:55:39 +0000 Subject: [PATCH] Clarified the Back Button Task Some students were getting confused about how to solve task 4.2.4 The instructions should now make it easier for them to solve the problem. --- 01 Dynamic Websites.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/01 Dynamic Websites.md b/01 Dynamic Websites.md index f7ef724..c7690a4 100644 --- a/01 Dynamic Websites.md +++ b/01 Dynamic Websites.md @@ -219,11 +219,12 @@ Now we have built the book details page we need to add hyperlinks to each book i 2. You have added additional fields to the database but these are not shown. Modify the script (and the html template) to display these missing fields. 3. The _page title_ currently displays the text `Bookshop`. Change this to display the name of the book. To do this you will need to insert an additional data placeholder in the shared **template file**. 1. You should keep the default title on the other pages in the website. To do this you should use the handlebars [conditional helper](https://handlebarsjs.com/block_helpers.html) -4. Add a hyperlink to return to the search page (not a button). This should _not_ make use of any client-side javascript such as `window.history`. +4. Add a hyperlink to return to the search page (not a button). The html should look something like this`back`: 1. What has happened to the search filter when you go back to the previous page? - 2. You will need to pass this to the details page and pass it back when the back button is clicked. - 3. Add this to the URL you use to access the details page. - 4. You will then need to add this to the link to return to the search results page. + 2. To see a solution try searching for a product on amazon. + 3. When you look at the product details, notice that the search box is still there. + 4. This search box contains the search term you entered in the previous screen! + 5. Look at the URL of the details page, can you see how it has been implemented? ## 5 Inserting Data