Output items.categories inside a Repeated SectionIs there a way to add an Paypal Icon in Squarespace's billing section of the checkout page?Inconsistent Output between LESS CompilersCan I insert content after every third item in a Squarespace JSONT repeated loop?Embedding a functional website inside a Squarespace webpageHow to modify output of squarespace-headers System Variable in square space template.Resizing Squarespace header image container doesn't resize image insideUsing .append & .load to load a section of another page to target pageSquareSpace: Change section background color (Eamon / Ethan template)need logo in center of page section excluding left sidebar in squarespaceAdding URL parameters based on mobile-detect.js output

Why is the "ls" command showing permissions of files in a FAT32 partition?

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Mixing PEX brands

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

Terse Method to Swap Lowest for Highest?

Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?

The IT department bottlenecks progress. How should I handle this?

A social experiment. What is the worst that can happen?

Why does the Sun have different day lengths, but not the gas giants?

What are the advantages of simplicial model categories over non-simplicial ones?

Why would a new[] expression ever invoke a destructor?

What should you do if you miss a job interview (deliberately)?

Strong empirical falsification of quantum mechanics based on vacuum energy density

What is Cash Advance APR?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

How does the math work for Perception checks?

Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset

Plot of a tornado-shaped surface

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Has any country ever had 2 former presidents in jail simultaneously?

Why does a simple loop result in ASYNC_NETWORK_IO waits?

Is there a RAID 0 Equivalent for RAM?

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Open a doc from terminal, but not by its name



Output items.categories inside a Repeated Section


Is there a way to add an Paypal Icon in Squarespace's billing section of the checkout page?Inconsistent Output between LESS CompilersCan I insert content after every third item in a Squarespace JSONT repeated loop?Embedding a functional website inside a Squarespace webpageHow to modify output of squarespace-headers System Variable in square space template.Resizing Squarespace header image container doesn't resize image insideUsing .append & .load to load a section of another page to target pageSquareSpace: Change section background color (Eamon / Ethan template)need logo in center of page section excluding left sidebar in squarespaceAdding URL parameters based on mobile-detect.js output













0















I can't figure out how to output the categories from a collection.items. I can loop through the collection.categories .repeated section categoriesname.end but when I try to do the same thing a level deeper on the collection.items.categories to output the categories for each individual item using the same syntax. Nothing is outputted.



.repeated section items
.repeated section categoriesname.alternates with / .end
.end


But using the json formatter categories|json-pretty instead of name does what I need and spits out the categories for each item. I seem to be missing the key.



code example:



<!--WORKS-->

<squarespace:category collection="team">
.if categories
<div class="button-group filter-button-group">
<button data-filter="*">All</button>
.repeated section categories<button data-filter=".name">name</button>.end
</div>
.end
</squarespace:category>

<!--DOES NOT WORK-->

<section class="grid">
<squarespace:query collection="team" limit="100">
.repeated section items
<div class="grid-item">
<img customContent.teamImage/>
<h3>customContent.teamName</h3>
.repeated section categoriesname.alternates with / .end
</div>
.end
</squarespace:query>
</section>


Can anyone help? Thanks.










share|improve this question


























    0















    I can't figure out how to output the categories from a collection.items. I can loop through the collection.categories .repeated section categoriesname.end but when I try to do the same thing a level deeper on the collection.items.categories to output the categories for each individual item using the same syntax. Nothing is outputted.



    .repeated section items
    .repeated section categoriesname.alternates with / .end
    .end


    But using the json formatter categories|json-pretty instead of name does what I need and spits out the categories for each item. I seem to be missing the key.



    code example:



    <!--WORKS-->

    <squarespace:category collection="team">
    .if categories
    <div class="button-group filter-button-group">
    <button data-filter="*">All</button>
    .repeated section categories<button data-filter=".name">name</button>.end
    </div>
    .end
    </squarespace:category>

    <!--DOES NOT WORK-->

    <section class="grid">
    <squarespace:query collection="team" limit="100">
    .repeated section items
    <div class="grid-item">
    <img customContent.teamImage/>
    <h3>customContent.teamName</h3>
    .repeated section categoriesname.alternates with / .end
    </div>
    .end
    </squarespace:query>
    </section>


    Can anyone help? Thanks.










    share|improve this question
























      0












      0








      0








      I can't figure out how to output the categories from a collection.items. I can loop through the collection.categories .repeated section categoriesname.end but when I try to do the same thing a level deeper on the collection.items.categories to output the categories for each individual item using the same syntax. Nothing is outputted.



      .repeated section items
      .repeated section categoriesname.alternates with / .end
      .end


      But using the json formatter categories|json-pretty instead of name does what I need and spits out the categories for each item. I seem to be missing the key.



      code example:



      <!--WORKS-->

      <squarespace:category collection="team">
      .if categories
      <div class="button-group filter-button-group">
      <button data-filter="*">All</button>
      .repeated section categories<button data-filter=".name">name</button>.end
      </div>
      .end
      </squarespace:category>

      <!--DOES NOT WORK-->

      <section class="grid">
      <squarespace:query collection="team" limit="100">
      .repeated section items
      <div class="grid-item">
      <img customContent.teamImage/>
      <h3>customContent.teamName</h3>
      .repeated section categoriesname.alternates with / .end
      </div>
      .end
      </squarespace:query>
      </section>


      Can anyone help? Thanks.










      share|improve this question














      I can't figure out how to output the categories from a collection.items. I can loop through the collection.categories .repeated section categoriesname.end but when I try to do the same thing a level deeper on the collection.items.categories to output the categories for each individual item using the same syntax. Nothing is outputted.



      .repeated section items
      .repeated section categoriesname.alternates with / .end
      .end


      But using the json formatter categories|json-pretty instead of name does what I need and spits out the categories for each item. I seem to be missing the key.



      code example:



      <!--WORKS-->

      <squarespace:category collection="team">
      .if categories
      <div class="button-group filter-button-group">
      <button data-filter="*">All</button>
      .repeated section categories<button data-filter=".name">name</button>.end
      </div>
      .end
      </squarespace:category>

      <!--DOES NOT WORK-->

      <section class="grid">
      <squarespace:query collection="team" limit="100">
      .repeated section items
      <div class="grid-item">
      <img customContent.teamImage/>
      <h3>customContent.teamName</h3>
      .repeated section categoriesname.alternates with / .end
      </div>
      .end
      </squarespace:query>
      </section>


      Can anyone help? Thanks.







      squarespace






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      swaTuesiSeswaTuesiSe

      132111




      132111






















          1 Answer
          1






          active

          oldest

          votes


















          1














          When inside of .repeated section categories you should use @ to refer to the key you've scoped into. For example:



          .repeated section categories@.alternates with / .end



          Reference: https://developers.squarespace.com/templating-basics#ReferencingtheScope




          Using scope reference, written as @, allows you to reference the key
          you're scoped into. This is like (this) in JavaScript.







          share|improve this answer























          • Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

            – swaTuesiSe
            19 hours ago










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280477%2foutput-items-categories-inside-a-repeated-section%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          When inside of .repeated section categories you should use @ to refer to the key you've scoped into. For example:



          .repeated section categories@.alternates with / .end



          Reference: https://developers.squarespace.com/templating-basics#ReferencingtheScope




          Using scope reference, written as @, allows you to reference the key
          you're scoped into. This is like (this) in JavaScript.







          share|improve this answer























          • Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

            – swaTuesiSe
            19 hours ago















          1














          When inside of .repeated section categories you should use @ to refer to the key you've scoped into. For example:



          .repeated section categories@.alternates with / .end



          Reference: https://developers.squarespace.com/templating-basics#ReferencingtheScope




          Using scope reference, written as @, allows you to reference the key
          you're scoped into. This is like (this) in JavaScript.







          share|improve this answer























          • Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

            – swaTuesiSe
            19 hours ago













          1












          1








          1







          When inside of .repeated section categories you should use @ to refer to the key you've scoped into. For example:



          .repeated section categories@.alternates with / .end



          Reference: https://developers.squarespace.com/templating-basics#ReferencingtheScope




          Using scope reference, written as @, allows you to reference the key
          you're scoped into. This is like (this) in JavaScript.







          share|improve this answer













          When inside of .repeated section categories you should use @ to refer to the key you've scoped into. For example:



          .repeated section categories@.alternates with / .end



          Reference: https://developers.squarespace.com/templating-basics#ReferencingtheScope




          Using scope reference, written as @, allows you to reference the key
          you're scoped into. This is like (this) in JavaScript.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          BrandonBrandon

          1,4351617




          1,4351617












          • Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

            – swaTuesiSe
            19 hours ago

















          • Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

            – swaTuesiSe
            19 hours ago
















          Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

          – swaTuesiSe
          19 hours ago





          Funny. I tried that. But I must have made a syntax mistake for something since it didn't work. Thank you Brandon.

          – swaTuesiSe
          19 hours ago



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280477%2foutput-items-categories-inside-a-repeated-section%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript