3 ms·
Great topic for a book, just ordered it. To support embeddable menus for Real Time Farms we went with: - a script include that is very lightweight and only -
by krosaen 15y ago
Great topic for a book, just ordered it. To support embeddable menus for Real Time Farms we went with:
- a script include that is very lightweight and only
- document.writes an iframe and
- asynchronously loads a helper script to deal with cross domain communication so that the frame can change height when the menu tabs change
See it in action here http://www.northernspyfoodco.com/menus/dinner http://www.northernspyfoodco.com/menus/dinner
it eventually loads the iframe with this content:
http://www.realtimefarms.com/restaurant/northern-spy-food-co/iframe http://www.realtimefarms.com/restaurant/northern-spy-food-co...
The benefit of using an iframe so far has been much easier reuse of code for the widget content. However, we've had a few folks request to use their own stylesheet which can't be supported (instead we offer a configuration of the embed snippet to style a few things like menu width, fonts family and colors).
In any case, if we learn even a single helpful trick about embedding rich content from this book, it will have been money well spent!
- bentlegen 15y agoVery cool widget. Integrates really well with the page - if you hadn't told me, I'd have no idea it was being served externally.