mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Moved NewsletterSignupForm to the object, made a link to this from the blogentry page
This commit is contained in:
parent
5668169744
commit
3117340cc5
@ -140,6 +140,14 @@ class BlogEntry extends Page {
|
|||||||
return $this->getParent()->Link('post')."/".$this->ID."/";
|
return $this->getParent()->Link('post')."/".$this->ID."/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the NewsletterSignupForm from the parent (BlogHolder).
|
||||||
|
*/
|
||||||
|
function NewsletterSignupForm() {
|
||||||
|
if(isset($this->Parent->ID) && $this->Parent->NewsletterSignupForm()) {
|
||||||
|
return $this->Parent->NewsletterSignupForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to enable WYSIWYG editing on your blog entries.
|
* Call this to enable WYSIWYG editing on your blog entries.
|
||||||
|
@ -90,6 +90,13 @@ class BlogHolder extends Page {
|
|||||||
return isset($_GET['tag']) ? $_GET['tag'] : false;
|
return isset($_GET['tag']) ? $_GET['tag'] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new instance of NewsletterSignupForm.
|
||||||
|
*/
|
||||||
|
function NewsletterSignupForm() {
|
||||||
|
return new NewsletterSignupForm($this, 'NewsletterSignupForm');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple form for creating blog entries
|
* A simple form for creating blog entries
|
||||||
*/
|
*/
|
||||||
@ -234,10 +241,6 @@ class BlogHolder_Controller extends Page_Controller {
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
function NewsletterSignupForm() {
|
|
||||||
return new NewsletterSignupForm($this, 'NewsletterSignupForm');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the rss feed for this blog holder's entries
|
* Get the rss feed for this blog holder's entries
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user