These are chat archives for locomotivecms/v3

5th
Feb 2017
Manu
@manuchap
Feb 05 11:53
Ok I didn't get it first time. Try this: http://redirect.center
Manu
@manuchap
Feb 05 13:02

@DonKoko
Model:

---
name: Logs
slug: logs
label_field_name: login
public_submission_enabled: true
entry_template: '<a href="{{ link }}">{{ entry._label }}</a> {{ entry.date_log }} {{ entry.ip }}'
fields:
- login:
    label: login
    type: string
    required: true
    unique: false
    localized: false
- password:
    label: password
    type: string
    required: true
    unique: false
    localized: false
- date_log:
    label: date
    type: date
    required: false
    unique: false
    localized: true
- ip:
    label: ip
    type: string
    required: false
    unique: false
    localized: false

Data:

- azer.reza@azer.fr:
    _slug: azer-point-reza-arobase-azer-point-fr
    login: azer.reza@azer.fr
    password: azer
    date_log: '2017-01-25'
    ip: 127.0.0.1
- azer.reza@azer.fr:
    _slug: azer-point-reza-arobase-azer-point-fr-1
    login: azer.reza@azer.fr
    password: azer
    ip: 127.0.0.1
- azer.reza@azer.fr:
    _slug: azer-point-reza-arobase-azer-point-fr-2
    login: azer.reza@azer.fr
    password: azer
    date_log: '2017-02-02'
    ip: 127.0.0.1
- azer.reza@azer.fr:
    _slug: azer-point-reza-arobase-azer-point-fr-3
    login: azer.reza@azer.fr
    password: azer
    date_log: '2017-02-04'
    ip: 127.0.0.1
{% for log in contents.logs %}
  {{ log | map: 'ip' }}
{% endfor %}

relults in:
127.0.0.1 127.0.0.1 127.0.0.1 127.0.0.1

Manu
@manuchap
Feb 05 13:24
or:
{% for log in contents.logs %}
  {% assign collection = log | map: 'ip' %}
  {{ collection }}
{% endfor %}
S Tunji Turner
@stunjiturner
Feb 05 16:18
@manuchap thanks, exactly what i wanted