21307 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 345 Views |
-
Where is the Newsletter sign up located

23 August 2011 at 4:57am
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
-
Re: Where is the Newsletter sign up located

23 August 2011 at 5:36am
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!
-
Re: Where is the Newsletter sign up located

23 August 2011 at 8:32am
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);
}
} -
Re: Where is the Newsletter sign up located

23 August 2011 at 8:49am
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
| 345 Views | ||
|
Page:
1
|
Go to Top |


