Jump to:

23450 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Where is the Newsletter sign up located

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 534 Views
  • Sue
    Avatar
    Community Member
    26 Posts

    Where is the Newsletter sign up located Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: Where is the Newsletter sign up located Link to this post

    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!

  • Sue
    Avatar
    Community Member
    26 Posts

    Re: Where is the Newsletter sign up located Link to this post

    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);
       }
       
    }

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: Where is the Newsletter sign up located Link to this post

    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

    534 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.