{"id":202,"date":"2022-07-07T10:51:21","date_gmt":"2022-07-07T01:51:21","guid":{"rendered":"https:\/\/ta539.com\/bokumemo\/?p=202"},"modified":"2022-07-16T20:26:21","modified_gmt":"2022-07-16T11:26:21","slug":"test","status":"publish","type":"post","link":"https:\/\/ta539.com\/bokumemo\/2022\/07\/07\/test\/","title":{"rendered":"Drupal Twig"},"content":{"rendered":"<p>$form[&#8216;field_name&#8217;][$value[&#8216;id&#8217;]] = [<br \/>\n&#8216;#type&#8217; => &#8216;table&#8217;, &#8216;#tag&#8217; => &#8216;tr&#8217;,<br \/>\n&#8216;#attributes&#8217; => [&#8216;style&#8217; => &#8216;display:none&#8217;]<br \/>\n];<\/p>\n<p>$form[&#8216;field_name&#8217;][$value[&#8216;id&#8217;]] = [<br \/>\n&#8216;#id&#8217; => &#8216;field_name&#8217;, &#8216;#type&#8217; => &#8216;hidden&#8217;, &#8216;#value&#8217; => 1,<br \/>\n&#8216;#prefix&#8217; => &#8216;1&#8217;, \/\/ 1&lt;input type=&#8221;hidden&#8221;&gt; \u307f\u305f\u3044\u306a\u8868\u793a\u306b\u306a\u308b<br \/>\n];<\/p>\n<p>$form[&#8216;input&#8217;][&#8216;button_on_off&#8217;] = [<br \/>\n&#8216;#type&#8217; => &#8216;hidden&#8217;, &#8216;#value&#8217; => $button_flag,<br \/>\n];<\/p>\n<p>{{dump(_context|keys)}}<\/p>\n<p>{{ content.field_col_name.0[&#8216;#text&#8217;]|striptags|replace({&#8216;&amp;nbsp;&#8217;:&#8221;, &#8216;\\r\\n&#8217;:&#8221;, &#8216;\\n&#8217;:&#8221;, &#8216;\\r&#8217;:&#8221;})|slice(0,50)|raw }}<br \/>\n{% if &#8220;now&#8221;|date(&#8216;Y-m-d H:i:s&#8217;) > content.field_col_date.0[&#8216;#markup&#8217;]|date(&#8216;Y^m^d H:i:s&#8217;) %}<br \/>\n{% set get_param = get_paramter(&#8216;nid.content.param&#8217;) %}<br \/>\n{{ content.view_name_view_page_section }}<br \/>\n{% set item_array = item_array(content.field_col_name.0[&#8216;#text&#8217;]) %}<br \/>\n{% if content.field_col_item.getValue()|first.value > 0 %}<br \/>\n{% for item in items if not break %}{{ item.content }}{% if loop.index == 4 %}{% set break = true %}{%- endif -%}<\/p>\n<p>{% set rows_count = ((rows|length) \/ 8) | round(0, &#8216;cell&#8217;) %}<\/p>\n<p>{% set get_color = drupal_field(&#8216;field_col_coler&#8217;, &#8216;node&#8217;, get_param) %}<br \/>\n{{ drupal_field(&#8216;field_col_link&#8217;, &#8216;node&#8217;, 3) }}<br \/>\n{{ drupal_view(&#8216;view_name&#8217;, &#8216;view_page_section&#8217;) }}<\/p>\n<p>{{ label.0[&#8216;#context&#8217;].value|length > 10 ? label.0[&#8216;#context&#8217;].value|slice(0, 10) ~ &#8216;\u2026&#8217; : label.0[&#8216;#context&#8217;].value }}<\/p>\n<p>{% if paragraph.field_col_link.0.url.toString() is empty %}<\/p>\n<p>{{ row.cells.0.context[&#8216;color_flag&#8217;] }}<\/p>\n<p>{% if path(&#8216;&lt;current&gt;&#8217;) == &#8216;\/cart&#8217; %}<br \/>\n{% url(&#8216;&lt;current&gt;&#8217;)[&#8216;#markup&#8217;]|split(&#8216;\/&#8217;)|last == get_paramter(&#8216;nid.content.top&#8217;) %}<\/p>\n<p>drupal.libraries.yml<\/p>\n<p>item:<br \/>\n js:<br \/>\n  js\/link-and-url.js: {preprocess: false}<\/p>\n<p>{{ attach_library(&#8216;drupal\/item&#8217;) }}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>$form[&#8216;field_name&#8217;][$value[&#8216;id&#8217;]] = [ &#8216;#type&#8217; => &#8216;table&#8217;, &#8216;#tag&#8217; => &#8216;tr&#8217;, &#8216;#attributes&#8217; => [&#8216;style&#8217; => &#8216;display:none&#8217;] ]; $form[&#8216;field_name&#8217;][$value[&#8216;id&#8217;]] = [ &#8216;#id&#8217; => &#8216;field_name&#8217;, &#8216;#type&#8217; => &#8216;hidden&#8217;, &#8216;#value&#8217; => 1, &#8216;#prefix&#8217; => &#8216;1&#8217;, \/\/ 1&lt;input type=&#8221;hidden&#8221;&gt; \u307f\u305f\u3044\u306a\u8868\u793a\u306b\u306a\u308b ]; $form[&#8216;input&#8217;][&#8216;button_on_off&#8217;] = [ &#8216;#type&#8217; => &#8216;hidden&#8217;, &#8216;#value&#8217; => $button_flag, ]; {{dump(_context|keys)}} {{ content.field_col_name.0[&#8216;#text&#8217;]|striptags|replace({&#8216;&amp;nbsp;&#8217;:&#8221;, &#8216;\\r\\n&#8217;:&#8221;, &#8216;\\n&#8217;:&#8221;, &#8216;\\r&#8217;:&#8221;})|slice(0,50)|raw }} {% if &#8220;now&#8221;|date(&#8216;Y-m-d H:i:s&#8217;) > content.field_col_date.0[&#8216;#markup&#8217;]|date(&#8216;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[32,33],"class_list":["post-202","post","type-post","status-publish","format-standard","hentry","category-11","tag-drupal","tag-twig"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/comments?post=202"}],"version-history":[{"count":0,"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/posts\/202\/revisions"}],"wp:attachment":[{"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/categories?post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ta539.com\/bokumemo\/wp-json\/wp\/v2\/tags?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}