Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Custom HCard Templates #26

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment
Closed

Allow Custom HCard Templates #26

GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

@mangstadt
Copy link
Owner

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). Freemarker is the template library that ez-vcard uses to generate the HTML page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants