Skip to content

Instantly share code, notes, and snippets.

@bdunogier
Created September 24, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bdunogier/0c78b5ecd7ce31eb04e0e13aa4ef9a72 to your computer and use it in GitHub Desktop.
Save bdunogier/0c78b5ecd7ce31eb04e0e13aa4ef9a72 to your computer and use it in GitHub Desktop.
eZ Platform GraphQL query with html rendering of a landing page field
{
# "Places & tastes" landing page on ezplatform-ee-demo
content(id: 236) {
fields {
value {
html
}
}
}
}
{
"data": {
"content": {
"fields": [
{
"value": {
"html": "<span class=\"ezstring-field\">Places &amp; Tastes</span>"
}
},
{
"value": {
"html": "<span class=\"ezstring-field\">Places &amp; Tastes</span>"
}
},
{
"value": {
"html": " <div class=\"ezlandingpage-field\"><!-- START app/Resources/views/themes/tastefulplanet/layouts/1w__2_1__2_1__1w.html.twig (:themes/tastefulplanet/layouts:1w__2_1__2_1__1w.html.twig) --><div class=\"container-fluid landing-page__zones\"><div class=\"landing-page__zone landing-page__zone--10\" data-ez-zone-id=\"10\"><!-- START app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --><div class=\"landing-page__block block_hero\" data-ez-block-id=\"12\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/hero_image.html.twig (:themes/tastefulplanet/blocks:hero_image.html.twig) --><!-- START app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><div class=\"block-hero \"><article class=\"embed-wide content-type-blog-post\"><div class=\"banner-image\"><div class=\"thumbnail text-center\"><!-- START app/Resources/views/themes/tastefulplanet/block_item_wide/image.html.twig (:themes/tastefulplanet/block_item_wide:image.html.twig) --><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/7/0/3/1/1307-1-eng-GB/Brooklyn-New-York.jpg\" alt=\"\" class=\"img-fluid w-100 \" height=\"755 \" width=\"1140 \" /></figure><!-- STOP app/Resources/views/themes/tastefulplanet/block_item_wide/image.html.twig (:themes/tastefulplanet/block_item_wide:image.html.twig) --><div class=\"title\"><h1 class=\"field-title\">Brooklyn New York</h1></div></div></div></article></div><!-- STOP app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/hero_image.html.twig (:themes/tastefulplanet/blocks:hero_image.html.twig) --></div><!-- STOP app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --></div></div><div class=\"container landing-page__zones landing-page__zones--grid-2-1_2-1\"><div class=\"landing-page__zone landing-page__zone--11\" data-ez-zone-id=\"11\"><!-- START app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --><div class=\"landing-page__block block_contentlist\" data-ez-block-id=\"13\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/places_list.html.twig (:themes/tastefulplanet/blocks:places_list.html.twig) --><!-- START app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><div class=\"block-contentlist block-contentlist--places-list \"><div class=\"block-contentlist__header\"><div class=\"block-contentlist__icon-wrapper\"><svg class=\"ez-icon block-contentlist__icon\"><use xlink:href=\"/bundles/ezplatformadminui/img/ez-icons.svg#places\"></use></svg></div><h3 class=\"block-contentlist__title\">Places</h3><a class=\"block-contentlist__link block-contentlist__link--more\" href=\"/places-tastes/places\">\n More\n </a></div><div class=\"row block-contentlist__cards\"><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/3/6/2/1/1263-1-eng-GB/Valencia-Spain.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"734 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/places/valencia-spain\" >\n Valencia, Spain\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>Discover the third largest city in Spain.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/4/7/2/1/1274-1-eng-GB/Kochin-India.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"811 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/places/kochin-india\" >\n Kochin, India\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>We got the major port city on the south west coast of India.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/5/8/2/1/1285-1-eng-GB/Santo-Domingo-Dominican-Republic.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"760 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/places/santo-domingo-dominican-republic\" >\n Santo Domingo, Dominican Republic\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>The oldest European inhabited settlement in the Americas.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/6/9/2/1/1296-1-eng-GB/Anchorage-Alaska.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"819 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/places/anchorage-alaska\" >\n Anchorage, Alaska\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>New changes for Alaska's most populous city.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div></div></div><!-- STOP app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/places_list.html.twig (:themes/tastefulplanet/blocks:places_list.html.twig) --></div><!-- STOP app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --></div><div class=\"landing-page__zone landing-page__zone--12\" data-ez-zone-id=\"12\"><!-- START app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --><div class=\"landing-page__block block_rss\" data-ez-block-id=\"14\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/rss.html.twig (:themes/tastefulplanet/blocks:rss.html.twig) --><!-- START app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><div class=\"block-rss \"><h3 class=\"block-rss__title\"><a class=\"block-rss__link\" href=\"http://ez.no/\" target=\"_blank\">eZ Blog</a></h3><ul class=\"block-rss__items\"><li class=\"block-rss__item\"><a class=\"block-rss__item-title\" href=\"http://ez.no/Blog/The-Week-in-Review-eZ-Platform-2.3-Sneak-Peek-Slack-Changes-and-More\" title=\"The Week in Review: eZ Platform 2.3 Sneak Peek, Slack Changes and More\" target=\"_blank\">The Week in Review: eZ Platform 2.3 Sneak Peek, Slack Changes and More</a></li><li class=\"block-rss__item\"><a class=\"block-rss__item-title\" href=\"http://ez.no/Blog/Sneak-Peek-How-to-create-forms-with-the-new-Form-Builder\" title=\"[Sneak Peek] How to create forms with the new Form Builder\" target=\"_blank\">[Sneak Peek] How to create forms with the new Form Builder</a></li><li class=\"block-rss__item\"><a class=\"block-rss__item-title\" href=\"http://ez.no/Blog/The-Week-in-Review-Translations-Product-Feedback-and-More\" title=\"The Week in Review: Translations, Product Feedback and More\" target=\"_blank\">The Week in Review: Translations, Product Feedback and More</a></li><li class=\"block-rss__item\"><a class=\"block-rss__item-title\" href=\"http://ez.no/Blog/The-Week-in-Review-Vote-for-eZ-Platform-Sneak-Peek-eZ-Platform-2.3-and-More\" title=\"The Week in Review: Vote for eZ Platform, Sneak Peek eZ Platform 2.3 and More\" target=\"_blank\">The Week in Review: Vote for eZ Platform, Sneak Peek eZ Platform 2.3 and More</a></li></ul></div><!-- STOP app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/rss.html.twig (:themes/tastefulplanet/blocks:rss.html.twig) --></div><div class=\"landing-page__block block_banner\" data-ez-block-id=\"15\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/banner/narrow.html.twig (:themes/tastefulplanet/blocks/banner:narrow.html.twig) --><!-- START app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><div class=\"block-banner block-banner--narrow\"><a href=\"http://ez.no\" title=\"http://ez.no\" target=\"_blank\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/4/7/7/0/774-1-eng-GB/Contact-Us.jpg\" alt=\"\" class=\"img-fluid banner-full \" height=\"460 \" width=\"300 \" /></figure></a></div><!-- STOP app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/banner/narrow.html.twig (:themes/tastefulplanet/blocks/banner:narrow.html.twig) --></div><!-- STOP app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --></div><div class=\"landing-page__zone landing-page__zone--13\" data-ez-zone-id=\"13\"><!-- START app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --><div class=\"landing-page__block block_contentlist\" data-ez-block-id=\"16\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/tastes_list.html.twig (:themes/tastefulplanet/blocks:tastes_list.html.twig) --><!-- START app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><div class=\"block-contentlist block-contentlist--tastes-list \"><div class=\"block-contentlist__header\"><div class=\"block-contentlist__icon-wrapper\"><svg class=\"ez-icon block-contentlist__icon\"><use xlink:href=\"/bundles/ezplatformadminui/img/ez-icons.svg#places\"></use></svg></div><h3 class=\"block-contentlist__title\">Tastes</h3><a class=\"block-contentlist__link block-contentlist__link--more\" href=\"/places-tastes/tastes\">\n More\n </a></div><div class=\"row block-contentlist__cards\"><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/6/3/1/1/1136-1-eng-GB/Mexican-Cuisine.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"600 \" width=\"800 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/tastes/mexican-cuisine\" >\n Mexican Cuisine\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>Mexican cuisine is primarily a fusion of indigenous Mesoamerican cooking with European, especially Spanish.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/9/4/1/1/1149-1-eng-GB/Ethiopian-Cuisine.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"640 \" width=\"640 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/tastes/ethiopian-cuisine\" >\n Ethiopian Cuisine\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>Ethiopian cuisine characteristically consists of vegetable and often very spicy meat dishes.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/2/6/1/1/1162-1-eng-GB/Thai-Cuisine.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"1140 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/tastes/thai-cuisine\" >\n Thai Cuisine\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>Thai cooking places emphasis on lightly prepared dishes with strong aromatic components and a spicy edge.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div><div class=\"col-md-6 pb-3\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --><div class=\"block-contentlist__card block-contentlist__card--grid\"><div class=\"block-contentlist__card-image\"><figure class=\"ezimage-field\"><img src=\"http://localhost:8001/var/site/storage/images/5/7/1/1/1175-1-eng-GB/Israeli-Cuisine.jpg\" alt=\"\" class=\"card-img img-fluid w-100 \" height=\"773 \" width=\"1140 \" /></figure></div><div class=\"block-contentlist__content-wrapper\"><h2 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/places-tastes/tastes/israeli-cuisine\" >\n Israeli Cuisine\n </a></h2><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>Israeli cuisine has adopted elements of various styles of Jewish cuisine and regional Levantine cuisine.</p></div></div></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/contentlist/place.html.twig (:themes/tastefulplanet/blocks/contentlist:place.html.twig) --></div></div></div><!-- STOP app/Resources/views/blocks/_block.html.twig (:blocks:_block.html.twig) --><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/tastes_list.html.twig (:themes/tastefulplanet/blocks:tastes_list.html.twig) --></div><!-- STOP app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --></div><div class=\"landing-page__zone landing-page__zone--14\" data-ez-zone-id=\"14\"><!-- START app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --><div class=\"landing-page__block block_contentlist\" data-ez-block-id=\"17\"><!-- START app/Resources/views/themes/tastefulplanet/blocks/cards_list.html.twig (:themes/tastefulplanet/blocks:cards_list.html.twig) --><div class=\"block-contentlist block-contentlist--cards-list \"><h3 class=\"block-contentlist__title\">Blog</h3><div class=\"block-contentlist__cards\"><div class=\"block-contentlist__card\"><h4 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/blog/where-we-get-our-best-writing-done\">Where we get our best writing done</a></h4><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>The number of possible work places in New York is truly astounding. There are a lot of places within walking distance of the Tasteful Planet on Bedford Avenue, in Williamsburg Brooklyn.</p></div></div></div><div class=\"block-contentlist__card\"><h4 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/blog/travel-literature-how-to-get-started\">Travel literature, How to get started </a></h4><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>There are multiple options when blasting off a journalistic adventure like ours. We think you&rsquo;d like to know what are the options when publishing about travels and cuisines. Here are the options we most liked:</p></div></div></div><div class=\"block-contentlist__card\"><h4 class=\"block-contentlist__card-title\"><a class=\"block-contentlist__card-link\" href=\"/blog/why-we-love-nyc\">Why we love NYC</a></h4><div class=\"block-contentlist__card-body\"><div class=\"ezrichtext-field\"><p>New York &ndash; often called New York City or the City of New York to distinguish it from the State of New York.</p></div></div></div></div><style type=\"text/css\"></style></div><!-- STOP app/Resources/views/themes/tastefulplanet/blocks/cards_list.html.twig (:themes/tastefulplanet/blocks:cards_list.html.twig) --></div><!-- STOP app/Resources/views/themes/tastefulplanet/zone/zone.html.twig (:themes/tastefulplanet/zone:zone.html.twig) --></div></div><div class=\"container-fluid landing-page__zones\"><div class=\"landing-page__zone landing-page__zone--15\" data-ez-zone-id=\"15\"></div></div><!-- STOP app/Resources/views/themes/tastefulplanet/layouts/1w__2_1__2_1__1w.html.twig (:themes/tastefulplanet/layouts:1w__2_1__2_1__1w.html.twig) --></div>"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment