Ticket #2527 (closed enhancement: wontfix)

Opened 23 months ago

Last modified 23 months ago

Implement a method of loading templates into the demo site

Reported by: aron.carroll Owned by: aron.carroll
Priority: major Milestone: ckan-sprint-2012-06-25
Component: ckan Keywords: demo-theme
Cc: toby Repository: ckan
Theme: none

Description (last modified by aron.carroll) (diff)

JavaScript? needs to be able to insert html templates into the document.

There are three common solutions to templating at the moment.

  1. Insert the html into <script> tags at the bottom of the page and pull them in using the DOM and innerHTML. This is a very simple solution but not very portable.
  2. Request the HTML snippets as plain text/html using XHR. This adds an extra HTTP request per template but is very clean. It would also be possible to inline the HTML into the JS at the minification stage for production.
  3. Include the HTML in JavaScript? strings (horrible to maintain and bloats the js)

It makes sense to keep these with the other templates so that we can take advantage of localisation where possible. This indicates 1 or 2.

Change History

comment:1 Changed 23 months ago by aron.carroll

  • Description modified (diff)

comment:2 Changed 23 months ago by toby

Do we have a specific usecase for this?

comment:3 Changed 23 months ago by seanh

  • Owner set to aron.carroll
  • Status changed from new to assigned

comment:4 Changed 23 months ago by aron.carroll

  • Status changed from assigned to closed
  • Resolution set to wontfix

Closing as this has been superceded by #2553

Note: See TracTickets for help on using tickets.