Adding Custom Fields on Settings and file location to edit

Silverstripe Version: 3

Question:

I need to edit the settings page and add some fields for my header and footer contents.

I cant find the file to do this, can someone help me? Please and thanks

Hi,

The best way is to extend the SiteConfig.
Take a look at the examples here: SiteConfig – SilverStripe Documentation

You should be able to add your header and footer content fields, and then they’ll be accessible from the templates.

1 Like

Hi,

just a quick question.

where can I find the app.yml? I can only see config.yml.
or should I create this one in _config folder?

Hi again,

So I was able to add the fields, but I cannot figure out how to call the contents in my header.

for example,

I call $Mobile_Number but it didn’t show anything at my site.
What am I missing?

Ok. I got it.

I also need to put $SiteConfig to call what I added
so it will look like this.

<% with $SiteConfig %>
    $Mobile_Number
<% end_with %>

Thanks

You can also use the dot notation to access properties:

$SiteConfig.Mobile_Number