Embed
This is practically a simple form that allows user to configure a web widget.
The code can be found in the textarea in the same view. An example code
looks like that:
```html
<script>
System Message: WARNING/2 (<string>, line 15); backlink
Inline literal start-string without end-string.
System Message: WARNING/2 (<string>, line 15); backlink
Inline interpreted text or phrase reference start-string without end-string.
System Message: ERROR/3 (<string>, line 17)
Unexpected indentation.
- (function() {
var s = document.createElement('script');
s.src = 'http://nohost/plone/events/embed.js';
s.async = true;
window.topic_options = (window.topic_options || []).concat([ {
System Message: ERROR/3 (<string>, line 22)
Unexpected indentation.
element_id: 'embeded_id',
elements_length: 5, //how many elements to show
embed_css: true, //embed rt.topicembed css styles
new_window: true //open links in new window
System Message: WARNING/2 (<string>, line 26)
Block quote ends without a blank line; unexpected unindent.
}]);
document.body.appendChild(s);
System Message: WARNING/2 (<string>, line 28)
Definition list ends without a blank line; unexpected unindent.
}());
System Message: WARNING/2 (<string>, line 29)
Block quote ends without a blank line; unexpected unindent.
</script>
```
System Message: WARNING/2 (<string>, line 29); backlink
Inline literal start-string without end-string.
System Message: WARNING/2 (<string>, line 29); backlink
Inline interpreted text or phrase reference start-string without end-string.
This code can be later embeded on the external site, the same as twitter widget.
Output
The template for rendering the output is registered by this ZCML slug:
- ```xml
System Message: WARNING/2 (<string>, line 46); backlink
Inline literal start-string without end-string.
System Message: WARNING/2 (<string>, line 46); backlink
Inline interpreted text or phrase reference start-string without end-string.
- <browser:page
name="json"
for="Products.ATContentTypes.interfaces.topic.IATTopic"
layer="..interfaces.IBrowserLayer"
class=".embed.EmbedJSON"
permission="zope2.View"
System Message: WARNING/2 (<string>, line 47)
Block quote ends without a blank line; unexpected unindent.
/>
System Message: WARNING/2 (<string>, line 48)
Definition list ends without a blank line; unexpected unindent.
```
and it's called items_macro.pt. It generates an HTML output similar to:
System Message: WARNING/2 (<string>, line 48); backlink
Inline literal start-string without end-string.
```html
<div>
System Message: WARNING/2 (<string>, line 51); backlink
Inline literal start-string without end-string.
System Message: WARNING/2 (<string>, line 51); backlink
Inline interpreted text or phrase reference start-string without end-string.
System Message: ERROR/3 (<string>, line 53)
Unexpected indentation.
- <p>
- <a href="http://nohost/plone/events/event1">Event 1 title</a>
System Message: WARNING/2 (<string>, line 55)
Definition list ends without a blank line; unexpected unindent.
</p>
<div>Short event description</div>
<img src="http://nohost/plone/events/event1/image_mini" title="Event 1 image">
System Message: WARNING/2 (<string>, line 58)
Block quote ends without a blank line; unexpected unindent.
</div>
<div>
System Message: ERROR/3 (<string>, line 60)
Unexpected indentation.
- <p>
- <a href="http://nohost/plone/events/event2">Event 2 title</a>
System Message: WARNING/2 (<string>, line 62)
Definition list ends without a blank line; unexpected unindent.
</p>
<div>Other event description</div>
<img src="http://nohost/plone/events/event2/image_mini" title="Event 2 image">
System Message: WARNING/2 (<string>, line 65)
Block quote ends without a blank line; unexpected unindent.
</div>
```
System Message: WARNING/2 (<string>, line 65); backlink
Inline literal start-string without end-string.
System Message: WARNING/2 (<string>, line 65); backlink
Inline interpreted text or phrase reference start-string without end-string.