In this solution to the challenge assignment, Kevin demonstrates how to modify the navigation so that only pages for the current subject are shown. Clicking on a subject will shows its related pages and also show the content for the first page by default.
- [Instructor] Hopefully you did well…with your first challenge assignment,…to build a collapsing navigation.…In this movie,…I 'll show you the solution that I came up with.…The first thing that I did was I went into the navigation…and I wanted to make that link for each subject…be meaningful.…So I added the subject ID to it.…I wanted to be able to know…which subject was currently selected.…Now, there is the possibility…that you could have tried to send the page ID…to know which current page was selected,…since we're going to be showing that page's content…to begin with,…but that would have required me…to figure out the page ID…before I started my loop…through all of the different navigation pages,…and that's a little bit tricky to do.…
I need to know it up here,…and there are ways that you could work around it,…you could not display these three lines…until we actually get inside the loop,…but that's a little bit clunky.…I think a more elegant way to do it…is just to go ahead and submit the subject ID here.…So I'm using nav subject ID,…
- Creating a content management system
- Building dynamic content navigation
- Using context and function options for conditional behavior
- Hiding content from the public view
- Insecure direct object reference
- Allowing HTML in dynamic content
- Previewing content in the public context
- Working with cookies and sessions
- Storing status messages in the session
- Secure user authentication (login/logout)
- Regulating page access
- Nesting related resources
- Managing an ordered list automatically
Skill Level Beginner
1. Create a Content Management System
2. Build Dynamic Content Navigation
3. Use Context and Options
4. Cookies and Sessions
5. Regulate Page Access
6. Nesting Related Resources
Next steps1m 15s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.