inside out – STEP 202 | Giving Our Navigation a Place To Go – Assignment
Overview
In this lesson we create a function to add our page content dynamically based on a url parameter. We make a few modifications to our menuBuilder function to pass the information to the getPage function we create and make some changes to the styles as well as add some animation to our page draws.
Assignment Resources
- inside out – Project Change Log STEP 201 to STEP 202
- Animate.css CDN Link – inside out Project Global Resource
- inside out – STEP 202 | Giving Our Navigation a Place To Go
- inside out – STEP 202 | Example Website
Action Items to Complete
- Complete all steps completed in the video “inside out – STEP 202 | Giving Our Navigation a Place To Go – Assignment”.
- 00:00 – Introduction
- 00:13 – starting here
- 00:19 – where we currently are
- 00:44 – where we are going
- 01:17 – overview of files after step 201
- 03:08 – set DW to push to the server on page save
- 04:28 – copy 201 folder and rename the copy to 202
- 05:18 – delete page.home.inc.php file
- 05:36 – update site title to STEP 202
- 06:04 – push/put entier step 202 folder to host
- 06:27 – why is my footer up against my header
- 07:31 – grab the data from our content file
- 08:05 – create pageData & pageJson variables
- 08:26 – comment on $pageData variable
- 11:51 – completed pageData and PageJson vars
- 13:21 – begin building the getPage function
- 14:52 – add default page var to getPage function
- 15:27 – define DEFAULT_PAGE Variable
- 17:01 – define content var in getPage func
- 19:09 – add return statment to getPage func
- 20:54 – call getPage function & echo it’s retun
- 24:37 – update href in the link in our menuBuild
- 25:10 – add the pg url paramater to the link
- 28:27 – adding basename php function to link
- 30:47 – add $GET[] to the getPage function
- 32:05 – add spaces in the second parm in getPag
- 33:44 – add foreach to getPage func
- 34:36 – add if statment in foreach in getPage
- 35:17 – update content variable in foreach in ge
- 35:55 – add PageName to content
- 37:04 – add PageContent to content
- 37:53 – update div class to container
- 38:25 – handle when there is no pg parm
- 39:10 – using the PHP empty function
- 40:24 – add home element to content.json file
- 43:02 – handle content var for edge case
- 47:30 – create short hand conditional statement
- 48:59 – add link to our header logo/title
- 49:26 – update header.inc.php with logo link
- 50:54 – create css rule for logo/title style
- 52:26 – link style.css in header.inc.php
- 53:16 – update style.css link comment
- 54:02 – add some animation to our site
- 54:25 – add animate.css to the header.inc.php
- 55:24 – add animation to getPage function
- 57:07 – move menuBuilder func to top of page
- 57:28 – clean up code in functions.inc.php page
- 58:15 – lesson review
- Review your work to make sure it is error free and aligns to the completed work in the video.
- Submit the url to your website once you have validated your work and are confident you have completed everything. The link you submit should look similar to: https://inside-out-project.com/php/step-202/