Accessing datasets to generate list items with each statement


#1

I’d like to create new catalog card list items with an each statement using the ‘catalog_items’ dataset. This dataset consists of three fields:

title (text)
description (text)
image (image)

Based on the html I have provided below, I am still unable to generate my list items. Is there something important that I am missing about each statements?

<!-- Catalog cards -->

    {{each catalog_items as item sort by item.sort asc}}
<div class="row">
	<div class="container-fluid">
		<div class="col-xs-12 card-1" id="catalog-items">
			<div class="row">
				
				<div class="col-xs-12 col-md-5 col-md-push-7 text-center card-1">
					<img class="z-responsive-width" src="{{item.image.getImage(320,240,crop)}}" />
				</div> <!-- end .col-xs-5 text-center card-1 -->
			
				<div class="col-xs-12 col-md-7 col-md-pull-5 card-1">
					<h4 class="category-header">{{item.title}}</h4>
								
					<div class="row">
						
						<div class="col-xs-12 card-1">
							
							<p class={{item.description}}</p>
						</div> <!-- end .col-xs-12 -->
						<div class="container-fluid">
							<div class="col-xs-12 card-1">
								<ul>
									<li> Item #1 </li>
									<li> Item #2 </li>
									<li> Item #3 </li>
									<li> Item #4 </li>
								</ul>
								
							</div> <!-- end .col-xs-12 card 1 -->
						</div>
					</div> <!-- end .row -->
				</div> <!-- end .col-xs-7 card-1 -->
			</div> <!-- end .row -->
		</div> <!-- end .col-xs-12 card-1 -->
	</div> <!-- end .container-fluid -->
</div> <!-- end .row -->
{{end-each}}

#2

Mostly looks right to me. A couple things I would check. Do the references name match what’s in the config tab and are there catalog items set to “Live Now” in the content tab?

If it’s neither of those things, it could be that “item” can’t be used at a variable name, since that has meaning to mysql queries. Try using a more ambiguous variable for your loop and see if that helps.

If none of that helps, follow up here and I’ll come up with some more ideas.


#3

Still nothing

Reference names do match on the config tab and are set to “Live Now” and also switched “item” to “card”.

Could it be that I am placing the each loop in the wrong area?


#4

Hard to say without seeing it in context. Can you message me a link to the site?


#5

Now the page is deleted completely.
What is going on here?!


#6

Hey Oldenkott. Can you message me your site? I’d be happy to take a look and see if I can figure out what’s going on.