NdheerajNagar / ez-vcard

Automatically exported from code.google.com/p/ez-vcard
0 stars 0 forks source link

Allow Custom HCard Templates #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the template html file for hCard writing ( hcard-template.html ) is 
hard coded in HCardPage. Allowing the user to specify a custom template would 
permit much greater flexibility. For example, I currently have a project where 
the hCard data needs to be displayed as part of an existing html page rather 
than as a standalone page. Currently, the is no way to accomplish this without 
manually stripping off unwanted html tags.

Original issue reported on code.google.com by pbt...@gmail.com on 6 Mar 2015 at 8:00

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.  Sorry for taking so long to respond.  This isn't 
really practical because of the way hCard works.  It basically works by 
annotating your HTML with special "class" attributes that identify which parts 
of the webpage contain the vCard data.  Adding the ability to specify your own 
template file with ez-vcard wouldn't really alleviate much effort from the 
developer--they would still need to be familiar with the hCard specification in 
order to create the template.

If you want to supply your own template, I would recommend creating your own 
freemarker template (using the one in ez-vcard as an example) and then invoking 
freemarker manually yourself (using the HCardPage source code as an example).

Original comment by mike.angstadt on 20 Jun 2015 at 12:43