Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Footer Page Customization

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

Page: 1
Go to End
Author Topic: 1246 Views
  • dennis@fruchtman
    Community Member
    1 Post

    Footer Page Customization Link to this post

    I have a client who already has silverstripe installed and functioning properly (2.3.1). However, the "Footer Content"" page is set up in a very specific, almost too easy to use, manner. There are sections for page name, address1, address2, google maps link, store hours, copyright, and google analytics.

    I need to drop an image into the footer, but the way its currently setup wont allow for any html, or images to be placed there. What can I do to manipulate the footer to allow for images to be placed in? Any help is appreciated, thanks


  • theAlien
    Community Member
    131 Posts

    Re: Footer Page Customization Link to this post

    You have a few options, in all options you have to modify FooterContent.php, and in some cases also FooterContent.ss.
    The options:
    1) Set the datatype of one of the datafields to HTMLText or HTMLVarchar(255) (fx address1 => Text, becomes address1 => Varchar(255) ), so you can add HTML to the address1-field. If you like you can also change the addressfield to HTMLEditorField or TextareaField (instead of TextField).
    2) Add an Image datafield to the database:

    class FooterContent extends Page{
    static $has_one = array (
    myimage => image

    And now: read up on ImageField, or SimpleImageField. You might also want to read up on images, image uploading and formfieldtypes for more advanced AND general information.
    3) Create a new databasefield of the type HTMLText or HTMLVarchar(255). Create a new TextareaField FieldType to be able add any HTMLblock to your footer.

    If you created new datafields&formfields (as in 2 and 3), of course you also have to modify your template-file (.ss), otherwise the new info wouldn't show up.

    Good luck

    BTW maybe the person who set up your database already set some of those fields to HTMLText or HTMLVarchar. Just try it out...

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.