Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Access CustomSiteConfig DataObjects


Reply


2 Posts   248 Views

Avatar
VRoxane

Community Member, 42 Posts

6 July 2014 at 10:25pm

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 ?

Avatar
thomas.paulson

Community Member, 86 Posts

9 July 2014 at 2:11pm

replace CustomSiteConfig with Siteconfig

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