Please see the site here http://www.tlmlandscaping.com/. On the bottom of each page is a sign up for newsletter. How do I remove this? (I inherited this website from another designer and am only beginning working with SilverStripe. Thanks!
Sue
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Please see the site here http://www.tlmlandscaping.com/. On the bottom of each page is a sign up for newsletter. How do I remove this? (I inherited this website from another designer and am only beginning working with SilverStripe. Thanks!
Sue
It'll be in a template file (*.ss) and probably in the theme folder. I'd download the site and search for "EmailTipsForm" to find it.
Good luck Sue!
I found the following code on 2 pages, Page.php and FormPage.php - Do I just delete the info and save the page? Do I need to do a flush to make it take effect (that may be the part I forgot)? and can you remind me of what I add to the domain name to flush?
Thanks
Sue
/**
* submit email address for newsletters and tips form
*/
function EmailTipsForm() {
$heading = "Sign up for Hints & Tips e-Newsletter";
$fields = new FieldSet(
new EmailField("EmailAddress", $heading)
);
$actions = new FieldSet(
new FormAction('SubmitEmailForTips', 'Submit')
);
return new SearchForm($this, "EmailTipsForm", $fields, $actions);
}
/**
* Process tips email
*/
function SubmitEmailForTips($data, $form){
$emailSent = $data['EmailAddress'];
$submission = mysql_query("
INSERT INTO `TLM_contacts` (
`id`,
`FirstName`,
`LastName`,
`BusinessName`,
`Address_1`,
`Address_2`,
`City`,
`State`,
`Zip`,
`Email`,
`PhoneNumber`,
`FaxNumber`,
`MobileNumber`,
`Message`
) VALUES (
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
'$emailSent',
NULL,
NULL,
NULL,
NULL
)") or die (mysql_error());
Director::redirectBack();
}
function Siblings() {
$whereStatement = "ParentID = ".$this->ParentID;
return DataObject::get("Page", $whereStatement);
}
}
you could always just remove the entire "function EmailTipsForm() {...". then you won't need the dev/build
There should be something in a template like $EmailTipsForm that is putting it on the page. for basic questions there is an intro for that - http://www.silverstripe.org/general-questions/show/16055