These are chat archives for locomotivecms/v3

18th
May 2017
Cristian Livadaru
@lcx
May 18 09:48
hi, any Idea what I'm doing wrong here?
{% assign vendors=['vendor1', 'vendor2'] %}
{% for vendor in vendors %}
  <h1>{{vendor}}</h1>
{% endfor %}
Nikolay Bonev
@DonKoko
May 18 09:50
@lcx you cant assign arrays like this in liquid
to make an array you have to do
{% assign vendors ="vendor1^vendor2^vendor3" | split: "^" %}
then vendors will return an array
Filmtangent
@Filmtangent
May 18 13:38
Hi all, I was wondering if anyone knew how to access the index for specific content.
specifically, I want to show every other post in a separate columns (odd numbers in column 1, even in column 0), but I cant find a way to access the content's index, I think I'm missing something. If I access _id, all I get is the 'name
S Tunji Turner
@stunjiturner
May 18 20:20
hi buys building a family renuion site , any insights to tree structure or graphs
for my models
Manu
@manuchap
May 18 20:26
@stunjiturner You mean something like this?
https://github.com/pawnesh/family_tree
S Tunji Turner
@stunjiturner
May 18 20:29
yes in the UI phase, my models so far are, FamilyGroup, FamilyMembers, FamilyMememberProfile, working out the relationships between therm and others appears to more a graph structure should be used instead of a tree.
Manu
@manuchap
May 18 20:36
@Filmtangent You can get the index of an element in a lopp using {{ forloop.index }}
(I'm still searching for the radest way to to implement parity in a loop, hang around...)
Manu
@manuchap
May 18 20:47
@stunjiturner As in cousins, nephews and such? (depending on the branching depth from the main parent?)
S Tunji Turner
@stunjiturner
May 18 20:48
cousins nephews marriages, etc YES
Filmtangent
@Filmtangent
May 18 21:27
@manuchap great, I'll take a stab at this when I get a chance.
Manu
@manuchap
May 18 21:29
@stunjiturner Very interresting topic indeed! Are all the families related or of different "trees"?