{"action":"opened","issue":{"url":"https://api.github.com/repos/kalebheitzman/grav-plugin-events/issues/33","repository_url":"https://api.github.com/repos/kalebheitzman/grav-plugin-events","labels_url":"https://api.github.com/repos/kalebheitzman/grav-plugin-events/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/kalebheitzman/grav-plugin-events/issues/33/comments","events_url":"https://api.github.com/repos/kalebheitzman/grav-plugin-events/issues/33/events","html_url":"https://github.com/kalebheitzman/grav-plugin-events/issues/33","id":187295066,"number":33,"title":"Extending events add the new event type to @taxonomy.type ?","user":{"login":"nsteinmetz","id":33180,"avatar_url":"https://avatars.githubusercontent.com/u/33180?v=3","gravatar_id":"","url":"https://api.github.com/users/nsteinmetz","html_url":"https://github.com/nsteinmetz","followers_url":"https://api.github.com/users/nsteinmetz/followers","following_url":"https://api.github.com/users/nsteinmetz/following{/other_user}","gists_url":"https://api.github.com/users/nsteinmetz/gists{/gist_id}","starred_url":"https://api.github.com/users/nsteinmetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsteinmetz/subscriptions","organizations_url":"https://api.github.com/users/nsteinmetz/orgs","repos_url":"https://api.github.com/users/nsteinmetz/repos","events_url":"https://api.github.com/users/nsteinmetz/events{/privacy}","received_events_url":"https://api.github.com/users/nsteinmetz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-04T10:07:00Z","updated_at":"2016-11-04T10:07:00Z","closed_at":null,"body":"Hi,\r\n\r\nI would like to customise the event on admin side to add a few fields. \r\n\r\nSo I created a blueprint in my template named ``eventcvsq.yml`` containing:\r\n\r\n``` yaml\r\ntitle: Event CVSQ\r\n'@extends':\r\n    type: event\r\n    context: blueprints://event\r\n\r\nform:\r\n  fields:\r\n    tabs:\r\n      fields:\r\n    \r\n        contact:\r\n          type: tab\r\n          title: Event\r\n          fields:\r\n            header.event.cvsq_type:\r\n              type: select\r\n              label: Event CVSQ\r\n              options:\r\n                'ml': 'Manches Libres Laser'\r\n                'cf': 'Championnat de Flotte Laser'\r\n                'fc': 'Fête du club'\r\n                'al': 'Animation Libre Laser'\r\n                'rc': 'Régate CVSQ'\r\n                'ce': 'Coupe Entreprise'\r\n                'au': 'Autre'\r\n```\r\nSo on admin side, it works as expected.\r\n\r\nMy need would be at the end to filter on ``\"@taxonomy.type\": \"eventcvsq\"`` like this:\r\n\r\n``` twig\r\n<div class=\"row actualite\" data-equalizer data-equalize-on=\"medium\" id=\"cvsq-actualite\">\r\n    <div class=\"small-12 medium-4 large-4 columns\">\r\n        <div class=\"cvsq-block\" data-equalizer-watch>\r\n        <h4>Prochains &eacute;v&eacute;nements</h4>\r\n        {% set events =\r\n            page.collection({\r\n                'items': {\r\n                    '@taxonomy.type': 'eventcvsq',\r\n            },\r\n                'dateRange': {\r\n                    'start': datetools.today,\r\n                    'end': datetools.endOfYear\r\n                },\r\n                'order': {\r\n                    'by': 'date',\r\n                    'dir': 'asc'\r\n                },\r\n                'limit': 15\r\n            })\r\n        %}\r\n        {% for child in events %}\r\n            {% include 'partials/event_homepage.html.twig' with {'eventcvsq':page, 'page':child, 'truncate':true} %}        \r\n        {% endfor %}\r\n    </div>\r\n    </div>\r\n```\r\n\r\nI also added in the plugin setup the ``eventcvsq`` for the \"Event template types\" \r\n\r\nBut I have no output. When I use ``dump(child.taxonomy)``, I can see that my new events does not have the taxonomy.type added automatically, in opposite to defaults events.\r\n\r\nHow could I propagate the taxonomy.type to my custom events ?\r\n\r\nThanks,\r\nNicolas"}}
{"actor":{"display_login":"nsteinmetz"}}