Permalink
Browse files

Added basic templates for live-view of wordpress content, and associa…

…ted getType methods for returning the remote type of the content
  • Loading branch information...
1 parent efe7ac8 commit ed46ee55f79d92641a220257c4541298f4d5686f Marcus Nyeholt committed Feb 1, 2011
@@ -110,4 +110,7 @@ public function stageChildren() {
return $this->source->getPagesByParentId($this->externalId);
}
+ public function getType() {
+ return 'WpPage';
+ }
}
@@ -26,7 +26,7 @@ public static function factory($source, $data) {
$item->AuthorID = $data['wp_author_id'];
$item->AuthorName = $data['wp_author_display_name'];
$item->Status = $data['post_status'];
- $item->PostFormat = $data['wp_post_format'];
+ $item->PostFormat = isset($data['wp_post_format']) ? $data['wp_post_format'] : '';
if (isset($data['sticky'])) {
$item->Sticky = $data['sticky'];
@@ -119,5 +119,9 @@ public function numChildren() {
public function canImport() {
return class_exists('BlogEntry');
}
+
+ public function getType() {
+ return 'WpPost';
+ }
}
@@ -0,0 +1,10 @@
+
+<h2>$Title</h2>
+
+$Description
+
+<% control Children %>
+<p>
+<a href="$Link">$Title</a>
+</p>
+<% end_control %>
@@ -0,0 +1,4 @@
+
+<h2>$Title</h2>
+
+$Description

0 comments on commit ed46ee5

Please sign in to comment.