Template: Navigation + Dynamic Content

22 views
Skip to first unread message

Garrett Smith

unread,
Jun 4, 2015, 12:44:40 AM6/4/15
to expre...@googlegroups.com, kian....@gmail.com
We are trying to create a website with a split navigation for many pages.

http://www.hacksparrow.com/how-to-server-static-html-files-in-express-js.html


+-----+------------+
| Nav |  Dynamic  
|
|     |  Contents  |
|     |            |
|     |            |
|     |            |
|     |            |
|     |            |
+-----+------------+

We want the processing for the page views to be done on the server, not the client side. We have chose to use Express.
The dynamic contents are sent from the server, with the rest of the page.

We want to send back whole pages, where the whole page has a currentPage (the dynamic content) and a nav, the nav shows the link to that currentPage as bolded text (not a link for the current page). Every other link in the nav is an actual link.

When the user clicks on a link in the nav, the server sends back the corresponding page. That page contains the nav and the dynamic contents. The nav shows the active page as bold text (not a link)
. So the nav include (?) will need to have access to the currentPage, so that it can determine for each item, if that item should be a link or be just bold text.

We don't like jade or fake transpiling stuff.
Reply all
Reply to author
Forward
0 new messages