mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Don't show the NewsletterSignupForm unless there is a newsletter related to a BlogHolder that exists
This commit is contained in:
parent
10f5213192
commit
d1c6825941
@ -92,10 +92,13 @@ class BlogHolder extends Page {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a new instance of NewsletterSignupForm.
|
* Return a new instance of NewsletterSignupForm.
|
||||||
|
* If there is no related Newsletter, then don't show it.
|
||||||
*/
|
*/
|
||||||
function NewsletterSignupForm() {
|
function NewsletterSignupForm() {
|
||||||
|
if($this->Newsletter() && $this->Newsletter()->ID) {
|
||||||
return new NewsletterSignupForm($this, 'NewsletterSignupForm');
|
return new NewsletterSignupForm($this, 'NewsletterSignupForm');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple form for creating blog entries
|
* A simple form for creating blog entries
|
||||||
|
Loading…
Reference in New Issue
Block a user