Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » Access CustomSiteConfig DataObjects

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

Page: 1
Go to End
Author Topic: 187 Views
  • VRoxane
    Avatar
    Community Member
    42 Posts

    Access CustomSiteConfig DataObjects Link to this post

    Hi ! I'm using SStripe 3.1.4 on my project.

    I created DataObject "Picto" that are related to CustomSiteConfig via a has_many relationship.

    It works perfectly in the backend and I can add my Pictos but I can't loop and show them in the templates.

    I tried several things like :

    <% loop CustomSiteConfig %>
       <% loop Pictos %>
          <a href="$Lien" class="picto">$Titre $Image - Picto -</a>
       <% end_loop %>
       <% end_loop %>

    but I couldn't list my pictos

    Any idea ?

  • thomas.paulson
    Avatar
    Community Member
    79 Posts

    Re: Access CustomSiteConfig DataObjects Link to this post

    replace CustomSiteConfig with Siteconfig

    <% loop SiteConfig %>
    <% loop Pictos %>
    <a href="$Lien" class="picto">$Titre $Image - Picto -</a>
    <% end_loop %>
    <% end_loop %>

    187 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.