Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Server-side templating updates to for new ajax model #96

Closed
ebidel opened this issue Jan 6, 2015 · 0 comments
Closed

Server-side templating updates to for new ajax model #96

ebidel opened this issue Jan 6, 2015 · 0 comments
Labels
Milestone

Comments

@ebidel
Copy link
Contributor

ebidel commented Jan 6, 2015

As part of #94, we're changing the way ajaxified pages are dynamically injected on the page.

To adapt to this change, the server needs to render the shell of the page (the reusable markup shared across all pages) as it is today. However, to server-side rendering on the initial page load, the server needs to now populate placeholder <template>s with a the correct partial .html file.

For example, when loading about.html, the server would render the index.html template and also populate the 2 template placeholders with the pieces of template/about_partial.html:

<template id="template-content-placeholder" ref="">
  innerHTML of about_partial.html's <template id="template-onsite-content">
</template>

It would also fill <template id=“template-about-masthead”>.

Upon user navigation, ajax injection takes over an the ref of each template is updated to the new page. Whatever the server rendered in template(s) on initial page load is no longer used :)

This setup will also allow us to remove one request on page load. We won't need to populate the templates on the client, the server will take care of it. SEO and speed friendly!

We currently have placeholder pages (about.html, schedule.html, onsite.html) that also need to be removed in favor of the server rendering the correct page.

@devnook

@ebidel ebidel assigned alexmahan and x1ddos and unassigned alexmahan Jan 6, 2015
x1ddos added a commit that referenced this issue Jan 7, 2015
x1ddos added a commit that referenced this issue Jan 7, 2015
@ebidel ebidel added the backend label Jan 8, 2015
@ebidel ebidel modified the milestone: Phase 1 Jan 8, 2015
x1ddos added a commit that referenced this issue Jan 9, 2015
@ebidel ebidel closed this as completed in 205ebda Jan 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants