Hey,
2016-05-17 23:05 GMT+02:00 K. Frank <kfrank2...@gmail.com>:
> Hello List!
>
> How might I approach mixing Wt with non-Wt web programming?
>
> To be concrete, let's say I have a simple static web site that's
> implemented with html (say html5) / css and consists of a handful
> of pages.
>
> Suppose I want to add some "active" content to it -- some Wt
> widgets -- but still want to leave the bulk of the web site as
> plain html / css. Is there a straightforward was to embed some
> Wt content into an html page and have it "play nice"?
>
Wt has a so-called 'widget set' mode that is exactly that: it allows you to
embed a few Wt widgets in a different page (possibly hosted on a different
domain). In this case the application is imported inside this page as a
script. There is a feature/widgetset example that illustrates the
technique. It's also used on the homepage: the 'chat widget' is actually a
second Wt application which is embedded in the first. See also this blog
post on this topic:
https://www.webtoolkit.eu/wt/blog/2010/12/17/widgetset_mode_and_cross_origin_requests
Conversely, let's say I have a Wt-based web site, but want to
> add significant document-style static content to it, and I want
> to author and maintain the document content as html (and,
> furthermore, I don't want to compile the html into a Wt application
> or resource bundle). Is there a straightforward way to embed
> html content -- perhaps even multiple pages -- into Wt?
>
This is a bit harder: there are several approaches:
- read the HTML/CSS in a specialized WTemplate/WText which then renders it
inside your application as a widget
- serve the static HTML/CSS alongside the Wt application as a raw HTML
pages (using a static resource). For one customer we followed this approach.
The main challenge is to make sure that links and secondary resources are
pulled in correctly. That again depends on how they look like, etc...
> And let's say we do either one or both of the above. Would it
> be practical to style both the Wt and free-standing html parts
> of the web site with the same css?
>
For the widget set application, and the template approaches, that's
automatically the case.
For static HTML/CSS alongside this won't be the case.
Regards,
koen
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest