0 1 00:00:00,330 --> 00:00:03,540 So here's the final answer to the final challenge. 1 2 00:00:04,580 --> 00:00:11,680 We know that in order to be able to render that read more page, we need an anchor tag right? 2 3 00:00:11,810 --> 00:00:17,660 If we were to add our anchor tag inside our home.ejs let's try and do it here. 3 4 00:00:18,110 --> 00:00:21,730 Let's add an anchor tag that simply says Read more. 4 5 00:00:22,010 --> 00:00:26,180 And if I hit save and refresh then, you'll notice that I've got to read more 5 6 00:00:26,180 --> 00:00:29,400 that shows up below my paragraph. 6 7 00:00:29,440 --> 00:00:31,080 Now this might be what you want. 7 8 00:00:31,130 --> 00:00:33,240 If so, then continue this way. 8 9 00:00:33,350 --> 00:00:39,350 But if you wanted the read more to be on the same line as the paragraph tag, then you have to include 9 10 00:00:39,350 --> 00:00:43,650 this anchor tag just before the end of the paragraph, 10 11 00:00:43,670 --> 00:00:46,570 so somewhere here right? 11 12 00:00:46,810 --> 00:00:51,050 And so let's separate out our paragraph tag into its two components. 12 13 00:00:51,260 --> 00:00:56,780 One is that truncated bit of post content and the second one is going to be our anchor tag that will 13 14 00:00:56,780 --> 00:01:00,520 take us to that post's individual page. 14 15 00:01:00,710 --> 00:01:07,550 Now in order to do that, our anchor tag will need a link right? So will need an href. And the ref is going to 15 16 00:01:07,550 --> 00:01:12,190 equal to the URL that will take us to the individual page. 16 17 00:01:12,200 --> 00:01:19,370 Now we know that inside home.ejs we already have access to the post's title for each and every 17 18 00:01:19,370 --> 00:01:21,260 post on the home page. 18 19 00:01:21,260 --> 00:01:28,430 We already have access to this and we also know that we've set up our routes so that if we say posts 19 20 00:01:28,760 --> 00:01:36,300 / and we simply put in the name all the titles, so say Day 1 with a space in between 20 21 00:01:36,290 --> 00:01:43,790 so this looks exactly the same as the title and we hit enter, we'll get taken to the page of that blog 21 22 00:01:43,790 --> 00:01:45,340 post. 22 23 00:01:45,390 --> 00:01:51,580 That means that our href can simply be /posts/ 23 24 00:01:51,690 --> 00:01:59,970 the title of the post that we want to see. And to insert that we of course need our EJS tags, so angle 24 25 00:01:59,980 --> 00:02:08,380 percentage equals and then percentage angle. And in-between we're just going to put a post.title. And 25 26 00:02:08,390 --> 00:02:10,450 now we should be able to tap into that 26 27 00:02:10,460 --> 00:02:16,770 URL /posts/the title of each and every post. 27 28 00:02:16,940 --> 00:02:25,420 So now if I hit save and I refresh and I go back to my home page, then you can see I've now got this 28 29 00:02:25,440 --> 00:02:33,750 Read more link next to each truncated post and when I click on it it shows me the individual pages of 29 30 00:02:33,840 --> 00:02:34,880 the blog posts. 30 31 00:02:35,850 --> 00:02:38,820 I hope you had fun in this challenge module. 31 32 00:02:38,820 --> 00:02:44,160 I know it's pretty long but it goes through and re-affirms all of the things that we've learned up till 32 33 00:02:44,160 --> 00:02:44,950 now. 33 34 00:02:45,030 --> 00:02:52,800 And if you have completed this module without needing to look at a single hint or the answer, then you've 34 35 00:02:52,800 --> 00:02:58,800 done really really well and you should be getting a gold star for your efforts and you can be pretty 35 36 00:02:58,800 --> 00:03:05,180 confident that you've grasped all of the concepts up till now and you're ready to move on. 36 37 00:03:05,370 --> 00:03:12,510 Now if you needed to look at a couple of the hints or if you needed to look at all the hints and even 37 38 00:03:12,510 --> 00:03:15,760 the chances, I would recommend to give you a mind 38 39 00:03:15,840 --> 00:03:22,050 a few days break and then to go through the challenge once more with fresh eyes and try to complete 39 40 00:03:22,050 --> 00:03:24,640 it without using any of the hints. 40 41 00:03:24,660 --> 00:03:30,420 This really is where you are going to improve and where you're going to level up. And I recommend to 41 42 00:03:30,450 --> 00:03:36,540 give it some time and be patient and try to make sure that you've really made all of this knowledge 42 43 00:03:36,540 --> 00:03:38,770 your own before you proceed. 43 44 00:03:38,940 --> 00:03:43,000 So that's all from me and I look forward to seeing you in the next module.