Support #26096 » ai-conversion-kit.md
Replacing Advanced Views on jncohen.commons.gc.cuny.edu: a kit for an AI assistant
How to use this document
- Before you start: activate the Block Visibility plugin under Plugins.
- Start a new conversation with an AI assistant (Claude, ChatGPT, or similar).
- Paste in this whole document. It begins with instructions for the assistant, followed by a tested example and the details of your site.
- Then work on one View at a time. For example: "Let's do Course Facts. Here is the current code of the DATA 306 page:", followed by the code. To get the code, open the page, post or template in the editor and choose ⋮ (Options) → Code editor, then copy everything.
- Paste the assistant's block markup back into the Code editor, save, and check the page on the front end. Also check a post where some of the fields are empty.
- When every shortcode is gone, let the Commons team know, so they can remove the plugin from your site.
The site details in Part 3 were exported on 16 November 2026. If you've changed things since then, the code you paste in is what counts.
Part 1: Instructions for the AI assistant
You are helping a site administrator on the CUNY Academic Commons, a WordPress multisite network, to replace the Advanced Views plugin (acf-views) on their site. Each View is a Twig template that shows Advanced Custom Fields (ACF) values, and is embedded with a shortcode such as [avf-layout name="Course Facts" id="6a4e4e2240db0"]. The plugin is being removed from the network. Your job is to rebuild each View with core WordPress blocks, so that it renders the same without the plugin.
The environment, and its limits
- Software: WordPress 7.1 with the Twenty Twenty-Four block theme, ACF 6.8 (the free version), and the Block Visibility 3.8 plugin.
- The user's role: they are a site administrator, not a network administrator. They cannot run PHP or install plugins.
<script>tags andon…=attributes are stripped when they save, so no JavaScript of any kind. Do not suggest PHP,functions.php, code-snippet plugins or custom blocks that need a build step. - Where they work: in the block editor and the Site Editor (templates and patterns), including each editor's Code editor, where block markup can be pasted directly.
- Where CSS goes: the site's styles live in its custom CSS box. Give CSS as a separate snippet for the user to add there.
Tool 1: ACF block bindings (show a field's value in a core block)
ACF registers a block bindings source called acf/field. A bound attribute is replaced with the field's value when the page renders. Always use the field key (field_…), never the field name.
These blocks and attributes can be bound:
| Block | Attributes | Use for |
|---|---|---|
core/paragraph |
content |
text, textarea and date fields |
core/heading |
content |
text shown as a heading |
core/button |
url, text |
links whose URL, and optionally label, come from fields |
core/image |
url, alt |
image fields that return a URL |
The syntax goes in the block's metadata. In a bound block, leave the element's inner HTML empty (paragraph) or put placeholder text in it (button label). The binding replaces it.
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acf/field","args":{"key":"field_module_weeks"}}}},"className":"v"} -->
<p class="v"></p>
<!-- /wp:paragraph -->
<!-- wp:button {"metadata":{"bindings":{"url":{"source":"acf/field","args":{"key":"field_module_slides"}}}},"className":"jnc-btn primary"} -->
<div class="wp-block-button jnc-btn primary"><a class="wp-block-button__link wp-element-button">Slides ↗</a></div>
<!-- /wp:button -->
Points to know about bindings:
- "Allow Access to Value in Editor UI" must be on. ACF outputs nothing for a field unless this setting is on. It's in each field's settings, under ACF → Field Groups. Part 3 lists the fields where it is currently off. Remind the user to turn it on for every field a View uses.
- The editor won't show the values. Bound blocks may look empty, or show their placeholder text, in the editor. Judge the result on the front end, and don't type into bound blocks in the visual editor.
- Basic HTML survives. ACF sanitizes the value, which is enough for content that the old templates printed with
|raw.
Tool 2: Block Visibility (replaces {% if %})
Block Visibility adds a blockVisibility attribute to any block. On the front end, a block whose rules fail is removed from the page, not just hidden. This rule shows a block only when a field has a value:
"blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_weeks","operator":"notEmpty"}]}]}}}]}
- Within one rule set (
rules: [ … ]), all the rules must pass: this is AND. - Across rule sets (
ruleSets: [ {…}, {…} ]), any one set passing shows the block: this is OR. - Other operators:
empty,equal,notEqualandcontains. The last three take a"value". - Users can do the same without markup. Select a block, open the Visibility panel in the sidebar, and add an Advanced Custom Fields rule, choosing the field and "Has any value". Mention this, since some users will prefer the UI.
- Wrap anything conditional in a block. Put a Group block around the content that the template's
{% if %}surrounded, and give the Group the rule.
Tool 3: Synced patterns (replaces the shortcode)
A View is defined once and embedded in many places. The equivalent is a synced pattern:
- In the Site Editor, go to Patterns → Add new pattern and turn Synced on.
- Paste the block markup in its Code editor.
- In each post, page or template, replace the shortcode block with the pattern.
A bound block inside a synced pattern reads the fields of whichever post is being shown. This has been tested on this site.
In markup, a synced pattern is <!-- wp:block {"ref":123} /-->, where 123 is the pattern's ID (visible in the pattern editor's URL). The shortcode may sit in a Shortcode block, a Custom HTML block, or plain classic content. Replace the whole block, or the line in classic content.
A View used in only one or two templates (Module Facts, for example) can be pasted straight into the template instead.
Translating the Twig
| In the View | With blocks |
|---|---|
{% if x.value %} … {% endif %} |
Group block (or the single block) with a Block Visibility notEmpty rule on x's key |
{% if a.value or b.value %} |
two rule sets, one per field |
nested {% if %} |
nested Groups, each with its own rule |
{{ x.value }} as text |
Paragraph (or Heading) with a content binding |
| static text and labels | plain Paragraph blocks |
<a href="{{ x.value }}">Label</a> |
Button with a url binding, and a text binding if the label is also a field |
<img src="{{ x.value }}"> |
Image with a url binding |
| `\ | default('…')` |
<span> inside a line |
becomes a <p>. CSS has to put the pieces back on one line (display: inline or flex) |
<pre> content |
Paragraph plus CSS white-space: pre-wrap and a monospace font |
| JavaScript | not possible: say so plainly and offer alternatives |
class="…" on the old elements |
className on the new blocks, so the existing CSS still applies |
Styling pitfalls on this site (found in testing)
- Paragraph styles in post content. The site's CSS styles every
<p>inside post content with!important(font, size, margins:.monograph-single-content p). Bound values are always<p>elements, so fact, label and value paragraphs need rules that are more specific and also!important. See the CSS in Part 2. - Block spacing. Group blocks with the default layout add vertical space between their children. Remove it with
margin: 0on the relevant children. - Button classes. Button blocks put
classNameon the wrapping<div class="wp-block-button">, not on the<a>. Existing styles written fora.some-classmust be re-targeted to.some-class > .wp-block-button__link.
How to work
- Ask for the current code of whatever the user is changing. Then output only the replacement for the shortcode (or the full pattern markup), plus any CSS. Don't rewrite the rest of the template.
- Produce valid block markup. Every block's opening comment must match its HTML: a
classNamemust also appear in the element'sclassattribute. Don't invent block attributes. - List the fields whose "Allow Access to Value in Editor UI" setting needs turning on.
- Say what doesn't carry over (fallback labels, JavaScript), rather than quietly dropping it.
- Suggest a test: a post with all fields filled in, and one with some left empty.
Part 2: A tested example (Module Facts)
This replaced the Module Facts View in a copy of the site's Module template, and rendered the same as the original. Rows with empty fields disappear, and the Materials section appears only if there are slides or notes. The same blocks, saved as a synced pattern, also worked for Course Facts in page content.
The original View:
<div class="jnc-facts">
{% if weeks.value %}<div class="jnc-fact"><span class="k">Weeks</span><span class="v">{{ weeks.value }}</span></div>{% endif %}
{% if course.value %}<div class="jnc-fact"><span class="k">Course</span><span class="v">{{ course.value }}</span></div>{% endif %}
{% if format.value %}<div class="jnc-fact"><span class="k">Format</span><span class="v">{{ format.value }}</span></div>{% endif %}
{% if est_time.value %}<div class="jnc-fact"><span class="k">Est. time</span><span class="v">{{ est_time.value }}</span></div>{% endif %}
</div>
{% if slides_url.value or notes_url.value %}
<div class="jnc-block">
<div class="jnc-eyebrow">Materials</div>
<div class="jnc-btns">
{% if slides_url.value %}<a class="jnc-btn primary" href="{{ slides_url.value }}">Slides ↗</a>{% endif %}
{% if notes_url.value %}<a class="jnc-btn" href="{{ notes_url.value }}">Module Notes ↗</a>{% endif %}
</div>
</div>
{% endif %}
The replacement block markup, which went where [avf-layout name="Module Facts" …] was:
<!-- wp:group {"className":"jnc-facts","layout":{"type":"default"}} -->
<div class="wp-block-group jnc-facts"><!-- wp:group {"className":"jnc-fact","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_weeks","operator":"notEmpty"}]}]}}}]},"layout":{"type":"default"}} -->
<div class="wp-block-group jnc-fact"><!-- wp:paragraph {"className":"k"} -->
<p class="k">Weeks</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acf/field","args":{"key":"field_module_weeks"}}}},"className":"v"} -->
<p class="v"></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
<!-- wp:group {"className":"jnc-fact","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_course","operator":"notEmpty"}]}]}}}]},"layout":{"type":"default"}} -->
<div class="wp-block-group jnc-fact"><!-- wp:paragraph {"className":"k"} -->
<p class="k">Course</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acf/field","args":{"key":"field_module_course"}}}},"className":"v"} -->
<p class="v"></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
<!-- wp:group {"className":"jnc-fact","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_format","operator":"notEmpty"}]}]}}}]},"layout":{"type":"default"}} -->
<div class="wp-block-group jnc-fact"><!-- wp:paragraph {"className":"k"} -->
<p class="k">Format</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acf/field","args":{"key":"field_module_format"}}}},"className":"v"} -->
<p class="v"></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
<!-- wp:group {"className":"jnc-fact","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_esttime","operator":"notEmpty"}]}]}}}]},"layout":{"type":"default"}} -->
<div class="wp-block-group jnc-fact"><!-- wp:paragraph {"className":"k"} -->
<p class="k">Est. time</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"acf/field","args":{"key":"field_module_esttime"}}}},"className":"v"} -->
<p class="v"></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- wp:group {"className":"jnc-block","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_slides","operator":"notEmpty"}]},{"enable":true,"rules":[{"field":"field_module_notes","operator":"notEmpty"}]}]}}}]},"layout":{"type":"default"}} -->
<div class="wp-block-group jnc-block"><!-- wp:paragraph {"className":"jnc-eyebrow"} -->
<p class="jnc-eyebrow">Materials</p>
<!-- /wp:paragraph -->
<!-- wp:buttons {"className":"jnc-btns"} -->
<div class="wp-block-buttons jnc-btns"><!-- wp:button {"metadata":{"bindings":{"url":{"source":"acf/field","args":{"key":"field_module_slides"}}}},"className":"jnc-btn primary","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_slides","operator":"notEmpty"}]}]}}}]}} -->
<div class="wp-block-button jnc-btn primary"><a class="wp-block-button__link wp-element-button">Slides ↗</a></div>
<!-- /wp:button -->
<!-- wp:button {"metadata":{"bindings":{"url":{"source":"acf/field","args":{"key":"field_module_notes"}}}},"className":"jnc-btn","blockVisibility":{"controlSets":[{"id":1,"enable":true,"controls":{"acf":{"ruleSets":[{"enable":true,"rules":[{"field":"field_module_notes","operator":"notEmpty"}]}]}}}]}} -->
<div class="wp-block-button jnc-btn"><a class="wp-block-button__link wp-element-button">Module Notes ↗</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group -->
The CSS added to the site's custom CSS:
/* Block versions of the old Views markup.
Core Paragraph blocks render <p>, which the site's content styles target
with !important, so these rules need !important and a bit more specificity. */
.jnc-facts > .jnc-fact, .jnc-block > p { margin: 0; }
.jnc-fact > p.k, .jnc-fact > p.v { margin: 0 !important; font-family: var(--jnc-mono) !important; line-height: inherit !important; }
.jnc-fact > p.k { font-size: 10px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--jnc-muted) !important; }
.jnc-fact > p.v { font-size: 12.5px !important; color: var(--jnc-text) !important; text-align: right; }
/* The Button block puts its class on a wrapper <div>; style the link inside. */
.jnc-btns.wp-block-buttons { gap: .5rem; }
.wp-block-button.jnc-btn { padding: 0; border: 0; background: none; }
.wp-block-button.jnc-btn > .wp-block-button__link { font-family: var(--jnc-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: .55rem .85rem; border: 1px solid var(--jnc-rule-strong); border-radius: 0; background: transparent; color: var(--jnc-text) !important; text-decoration: none !important; transition: all .18s; }
.wp-block-button.jnc-btn > .wp-block-button__link:hover, .wp-block-button.jnc-btn.primary > .wp-block-button__link { background: var(--jnc-blue); border-color: var(--jnc-blue); color: #fff !important; }
Part 3: The site's Views, fields and pages
ACF field groups
Use the key in bindings and visibility rules. ✗ means "Allow Access to Value in Editor UI" is currently off and must be turned on.
Course (shown when: page == 11379; or page_type == top_level)
| Key | Name | Type | Label | Bindings |
|---|---|---|---|---|
field_6a4e3ebe34745 |
code |
text | Code | ✗ off |
field_6a4e3f9234746 |
term |
text | Term | ✗ off |
field_6a4e3f9234747 |
credits |
text | Credits | ✗ off |
field_6a4e3f9234748 |
level |
text | Level | ✗ off |
field_6a4e3f9234749 |
meets |
text | Meets | ✗ off |
field_6a4e3f923474a |
room |
text | Room | ✗ off |
Module (shown when: page_parent == 12251; or page_parent == 13173; or page_parent == 13175; or post_category == category:modules)
| Key | Name | Type | Label | Bindings |
|---|---|---|---|---|
field_module_weeks |
weeks |
text | Weeks | on |
field_module_course |
course |
text | Course | on |
field_module_format |
format |
text | Format | on |
field_module_esttime |
est_time |
text | Est. time | on |
field_module_slides |
slides_url |
url | Slides URL | on |
field_module_notes |
notes_url |
url | Notes URL | on |
Paper (shown when: post_category == category:papers; or post == 10328)
| Key | Name | Type | Label | Bindings |
|---|---|---|---|---|
field_paper_eyebrow |
paper_eyebrow |
text | Eyebrow | on |
field_paper_type |
paper_type |
text | Type | on |
field_paper_venue |
paper_venue |
text | Venue | on |
field_paper_updated |
paper_updated |
text | Updated | on |
field_paper_length |
paper_length |
text | Length | on |
field_paper_doi |
paper_doi |
text | DOI (display) | on |
field_paper_doi_url |
paper_doi_url |
url | DOI URL | on |
field_paper_pdf_url |
paper_pdf_url |
url | PDF URL | on |
field_paper_repo_url |
paper_repo_url |
url | Repository URL | on |
field_paper_repo_label |
paper_repo_label |
text | Repository link label | on |
field_paper_abstract |
paper_abstract |
textarea | Abstract | on |
field_paper_keywords |
paper_keywords |
text | Topics (comma-separated) | on |
field_paper_bibtex |
paper_bibtex |
textarea | BibTeX | on |
field_paper_version_note |
paper_version_note |
text | Full-text banner note | on |
field_paper_fulltext |
paper_fulltext |
wysiwyg | Full text | on |
Show Info (shown when: page_parent == 10282)
| Key | Name | Type | Label | Bindings |
|---|---|---|---|---|
field_6a54209ae3781 |
description |
textarea | Description | ✗ off |
field_6a5420b9e3782 |
started |
date_picker (returns F Y) | Started | ✗ off |
field_6a5420fbe3783 |
ended |
date_picker (returns F Y) | Ended | ✗ off |
field_6a542156e3784 |
show_art |
image (returns url) | Show Art | ✗ off |
Software (shown when: post_category == category:software; or post == 11343; or post == 11345)
| Key | Name | Type | Label | Bindings |
|---|---|---|---|---|
field_sw_f1_label |
sw_f1_label |
text | Fact 1 label | on |
field_sw_f1_value |
sw_f1_value |
text | Fact 1 value | on |
field_sw_f2_label |
sw_f2_label |
text | Fact 2 label | on |
field_sw_f2_value |
sw_f2_value |
text | Fact 2 value | on |
field_sw_f3_label |
sw_f3_label |
text | Fact 3 label | on |
field_sw_f3_value |
sw_f3_value |
text | Fact 3 value | on |
field_sw_f4_label |
sw_f4_label |
text | Fact 4 label | on |
field_sw_f4_value |
sw_f4_value |
text | Fact 4 value | on |
field_sw_citation |
sw_citation |
textarea | Citation | on |
field_sw_button_label |
sw_button_label |
text | Primary button label | on |
field_sw_button_url |
sw_button_url |
url | Primary button URL | on |
field_6a514b5a735f6 |
sw_overview |
textarea | Overview | on |
field_sw_install |
sw_install |
textarea | Installation | on |
field_6a514b71735f7 |
sw_quickstart |
textarea | Example use | on |
field_sw_github_url |
sw_github_url |
url | GitHub repo URL | on |
field_sw_docs_url |
sw_docs_url |
url | Documentation URL | on |
field_sw_docs_label |
sw_docs_label |
text | Documentation link label | on |
Views, and where each is used
Course Facts
Shortcode: [avf-layout name="Course Facts" id="6a4e4e2240db0"]
Used in:
- page 13173 "DATA 790: Strategy & Decision-Making" (/data-790/)
page 13175 "DATA 306: Data Analysis and Modeling" (/data-306/)
- Used in the classic (non-block) content of two pages. In the editor these appear as a Classic block. Either convert it to blocks first, or replace the shortcode line with the pattern's
<!-- wp:block {"ref":…} /-->in the Code editor. The Part 2 example applies almost unchanged: samejnc-facts/jnc-factstructure, different fields.
- Used in the classic (non-block) content of two pages. In the editor these appear as a Classic block. Either convert it to blocks first, or replace the shortcode line with the pattern's
Template:
<div class="jnc-facts">
{% if code.value %}<div class="jnc-fact"><span class="k">Code</span><span class="v">{{ code.value }}</span></div>{% endif %}
{% if term.value %}<div class="jnc-fact"><span class="k">Term</span><span class="v">{{ term.value }}</span></div>{% endif %}
{% if credits.value %}<div class="jnc-fact"><span class="k">Credits</span><span class="v">{{ credits.value }}</span></div>{% endif %}
{% if level.value %}<div class="jnc-fact"><span class="k">Level</span><span class="v">{{ level.value }}</span></div>{% endif %}
{% if meets.value %}<div class="jnc-fact"><span class="k">Meets</span><span class="v">{{ meets.value }}</span></div>{% endif %}
{% if room.value %}<div class="jnc-fact"><span class="k">Room</span><span class="v">{{ room.value }}</span></div>{% endif %}
</div>
Module Facts
Shortcode: [avf-layout name="Module Facts" id="6a4e7f7f40621"]
Used in:
- template "Module"
template "Module (DATA 790)"
- Used in two templates. This is the Part 2 example, which can be pasted into both templates as it is.
Template:
<div class="jnc-facts">
{% if weeks.value %}<div class="jnc-fact"><span class="k">Weeks</span><span class="v">{{ weeks.value }}</span></div>{% endif %}
{% if course.value %}<div class="jnc-fact"><span class="k">Course</span><span class="v">{{ course.value }}</span></div>{% endif %}
{% if format.value %}<div class="jnc-fact"><span class="k">Format</span><span class="v">{{ format.value }}</span></div>{% endif %}
{% if est_time.value %}<div class="jnc-fact"><span class="k">Est. time</span><span class="v">{{ est_time.value }}</span></div>{% endif %}
</div>
{% if slides_url.value or notes_url.value %}
<div class="jnc-block">
<div class="jnc-eyebrow">Materials</div>
<div class="jnc-btns">
{% if slides_url.value %}<a class="jnc-btn primary" href="{{ slides_url.value }}">Slides ↗</a>{% endif %}
{% if notes_url.value %}<a class="jnc-btn" href="{{ notes_url.value }}">Module Notes ↗</a>{% endif %}
</div>
</div>
{% endif %}
Paper Body
Shortcode: [avf-layout name="Paper Body" id="6a4e82a6eddec"]
Used in:
- post 10328 "Adapting to AI" (/adapting-to-ai/)
- post 13017 "R Package scf: Guide and Validation" (/analyzing-the-survey-of-consumer-finances-with-scf/)
- post 13019 "Percentile-Based Grouping in SCF Analysis" (/percentile-based-grouping-in-scf-analysis/)
- post 13599 "Global Capitalism: A Sociological Perspective" (/global-capitalism/)
- post 13601 ""Economic Freedom" and Economic Growth" (/economic-freedom-and-economic-growth/)
- post 13603 "Is "Economic Freedom" the Same as Free Market Capitalism?" (/is-economic-freedom-the-same-as-free-market-capitalism/)
- post 13605 "Neoliberalism’s Relationship with Economic Growth in the Developing World" (/neoliberalism-and-economic-growth-in-the-developing-world/)
- post 13607 "The Historical Relationship between Inflation and Political Rebellion" (/inflation-and-political-rebellion/)
- post 13639 "Financial Crisis in American Households" (/financial-crisis-in-american-households/)
- post 13641 "The Myth of America’s “Culture of Consumerism”" (/myth-of-americas-culture-of-consumerism/)
- post 13643 "Neoliberalism" (/neoliberalism-emerging-trends/)
- post 13645 "The Arc of Neoliberalism" (/the-arc-of-neoliberalism/)
- post 13647 "Managing the Faustian Bargain" (/managing-the-faustian-bargain/)
- post 13649 "Neoliberalism and Patterns of Economic Performance, 1980–2000" (/neoliberalism-and-patterns-of-economic-performance/)
post 13651 "Information Inequality and Network Externalities" (/information-inequality-and-network-externalities/)
- Unused fields: as of the export, no paper has any Full text or Full-text banner note (
paper_fulltext,paper_version_note), so those parts can be dropped. If a paper needs full text later, the post body is the natural place for it. - DOI: a Button with both
text(paper_doi) andurl(paper_doi_url) bound, styled as a plain link. - Repository button: bind
texttopaper_repo_label. There is no automatic "Repository" fallback, so the label must be filled in on each paper that has a repository link. - BibTeX: a Paragraph with
white-space: pre-wrapand a monospace font. - The "Topics" group after the shortcode in each post is ordinary blocks and stays as it is.
- Two posts (13017 and 13019) have the shortcode inside a Custom HTML block rather than a Shortcode block.
- Unused fields: as of the export, no paper has any Full text or Full-text banner note (
Template:
<div class="jnc-paper">
{% if paper_eyebrow.value %}<div class="p-eyebrow">{{ paper_eyebrow.value }}</div>{% endif %}
<div class="p-metaband">
{% if paper_type.value %}<div class="meta"><span class="k">Type</span><span class="v">{{ paper_type.value }}</span></div>{% endif %}
{% if paper_venue.value %}<div class="meta"><span class="k">Venue</span><span class="v">{{ paper_venue.value }}</span></div>{% endif %}
{% if paper_updated.value %}<div class="meta"><span class="k">Updated</span><span class="v">{{ paper_updated.value }}</span></div>{% endif %}
{% if paper_length.value %}<div class="meta"><span class="k">Length</span><span class="v">{{ paper_length.value }}</span></div>{% endif %}
{% if paper_doi.value %}<div class="meta"><span class="k">DOI</span><span class="v"><a href="{{ paper_doi_url.value }}">{{ paper_doi.value }}</a></span></div>{% endif %}
</div>
<div class="p-btns">
{% if paper_pdf_url.value %}<a class="p-btn primary" href="{{ paper_pdf_url.value }}">Download PDF</a>{% endif %}
{% if paper_repo_url.value %}<a class="p-btn" href="{{ paper_repo_url.value }}">{{ paper_repo_label.value|default('Repository') }}</a>{% endif %}
</div>
{% if paper_abstract.value %}<div class="p-sech">Abstract</div><p class="p-abstract">{{ paper_abstract.value }}</p>{% endif %}
{% if paper_fulltext.value %}{% if paper_version_note.value %}<p class="p-versionnote">{{ paper_version_note.value }}</p>{% endif %}<div class="p-sech">Full text</div><div class="monograph-paper-body">{{ paper_fulltext.value|raw }}</div>{% endif %}
{% if paper_bibtex.value %}<div class="p-sech">Citation · BibTeX</div><pre class="p-bibtex">{{ paper_bibtex.value|raw }}</pre>{% endif %}
</div>
Software Side
Shortcode: [avf-layout name="Software Side" id="6a4e85d80aeb3"]
Used in:
- post 11343 "scf" (/scf/)
- post 11345 "External Namespaces" (/external-namespaces/)
- post 12253 "AI Art Styles" (/ai-art-styles/)
- post 13045 "Supply Chain Simulator" (/supply-chain-simulator/)
post 13765 "Best Laid Plans" (/best-laid-plans/)
- The shortcode is each post's entire content (in a Custom HTML block), and all these posts use the Software Single template. The simplest approach is to put the blocks in that template, next to its Post Content block, and empty the posts. Alternatively, use a synced pattern in each post.
- Labels are fields too. The fact labels (
sw_f1_labeland so on) are fields as well, so bind both paragraphs of each pair and put the visibility rule on the value. - "Example use" was
<pre><code>: use a Paragraph withwhite-space: pre-wrapand a monospace font. - No fallback label: there is no automatic "Documentation" fallback for the docs label.
Template:
<div class="monograph-software-grid">
<div class="monograph-software-side">
<div class="monograph-software-widget">
<p class="monograph-label">Package</p>
<div class="monograph-software-facts">
{% if sw_f1_value.value %}<div class="monograph-software-fact"><p>{{ sw_f1_label.value|raw }}</p><p>{{ sw_f1_value.value|raw }}</p></div>{% endif %}
{% if sw_f2_value.value %}<div class="monograph-software-fact"><p>{{ sw_f2_label.value|raw }}</p><p>{{ sw_f2_value.value|raw }}</p></div>{% endif %}
{% if sw_f3_value.value %}<div class="monograph-software-fact"><p>{{ sw_f3_label.value|raw }}</p><p>{{ sw_f3_value.value|raw }}</p></div>{% endif %}
{% if sw_f4_value.value %}<div class="monograph-software-fact"><p>{{ sw_f4_label.value|raw }}</p><p>{{ sw_f4_value.value|raw }}</p></div>{% endif %}
</div>
</div>
{% if sw_citation.value %}<div class="monograph-software-widget"><p class="monograph-label">Cite</p><div class="monograph-software-citation"><em>{{ sw_citation.value|raw }}</em></div></div>{% endif %}
{% if sw_button_url.value %}<div class="monograph-software-actions"><div class="monograph-software-buttons"><div class="wp-block-button monograph-software-button monograph-software-button-primary"><a class="wp-block-button__link" href="{{ sw_button_url.value }}">{{ sw_button_label.value|raw }} ↗</a></div></div></div>{% endif %}
</div>
<div class="monograph-software-main">
{% if sw_overview.value %}<div class="monograph-software-section"><p class="monograph-label">Overview</p><p>{{ sw_overview.value|raw }}</p></div>{% endif %}
{% if sw_install.value %}<div class="monograph-software-section"><p class="monograph-label">Installation</p><p>{{ sw_install.value|raw }}</p></div>{% endif %}
{% if sw_quickstart.value %}<div class="monograph-software-section"><p class="monograph-label">Example use</p><pre class="wp-block-code monograph-software-code"><code>{{ sw_quickstart.value|raw }}</code></pre></div>{% endif %}
{% if sw_github_url.value or sw_docs_url.value %}<div class="monograph-software-section"><p class="monograph-label">Source & docs</p><div class="monograph-software-links">{% if sw_github_url.value %}<a class="monograph-software-link" href="{{ sw_github_url.value }}">GitHub ↗</a>{% endif %}{% if sw_docs_url.value %}<a class="monograph-software-link" href="{{ sw_docs_url.value }}">{{ sw_docs_label.value|default('Documentation')|raw }} ↗</a>{% endif %}</div></div>{% endif %}
</div>
</div>
Show Hero
Shortcode: [avf-layout name="Show Hero" id="6a5423d0eb10d"]
Used in:
- page 12925 "Annex Sociology Podcast" (/podcast-episodes/annex/)
- page 12933 "Annex Sociology Podcast Segments" (/podcast-episodes/annex-segments/)
- page 12935 "Pod Scholarship" (/podcast-episodes/podscholar/)
page 12937 "QC Pod" (/podcast-episodes/qc-pod/)
- The View's CSS (below) must move into the site's custom CSS.
- Image:
show_artreturns a URL, so use an Image block with aurlbinding and a fixed alt text. - Dates: the "started – ended" line can be two bound paragraphs in a flex Group. Add the dash with CSS (
::beforeon the ended paragraph), and give the ended paragraph its ownnotEmptyrule.
Template:
<div class="monograph-show-hero">
<div class="monograph-show-hero-left">
{% if description.value %}
<p class="monograph-show-desc">{{ description.value }}</p>
{% endif %}
{% if started.value %}
<p class="monograph-show-facts">{{ started.value }}{% if ended.value %} – {{ ended.value }}{% endif %}</p>
{% endif %}
</div>
{% if show_art.value %}
<div class="monograph-show-hero-right">
<img class="monograph-show-art" src="{{ show_art.value }}" alt="Show cover art">
</div>
{% endif %}
</div>
CSS:
.monograph-archive-page{display:grid !important;grid-template-columns:minmax(0,68%) minmax(200px,32%) !important;column-gap:0 !important;row-gap:0 !important;}
.monograph-archive-page > .monograph-archive-hero{grid-column:1;grid-row:1;}
.monograph-archive-page > .monograph-show-hero{display:contents;}
.monograph-show-hero-left{grid-column:1;grid-row:2;min-width:0;padding-left:56px;padding-right:48px;}
.monograph-show-hero-right{grid-column:2;grid-row:1 / span 2;min-width:0;padding-left:48px;box-sizing:border-box;}
.monograph-show-art{width:100%;height:100%;object-fit:cover;border-radius:2px;display:block;}
.monograph-show-desc{font-family:var(--jnc-serif);font-size:18px;line-height:1.5;color:var(--jnc-text);margin:0 0 .75rem 0;}
.monograph-show-facts{font-family:var(--jnc-serif);font-size:15px;color:var(--jnc-muted);margin:0;}
.monograph-show-backlink{margin:0 !important;text-align:left !important;}
.monograph-show-backlink a{font-family:var(--jnc-serif);font-size:15px;color:var(--jnc-muted);text-decoration:none;}
.monograph-show-backlink a:hover{color:var(--jnc-blue);text-decoration:underline;}
.monograph-archive-page > .monograph-archive-grid{grid-column:1 / -1;grid-row:3;margin-top:2.5rem;}
.monograph-archive-categories .wp-block-categories-list{list-style:none;margin:0;padding:0;}
.monograph-archive-categories .wp-block-categories-list li{padding:8px 0;border-top:1px solid var(--jnc-rule);font-family:var(--jnc-serif);font-size:15px;line-height:1.35;color:var(--jnc-muted);}
.monograph-archive-categories .wp-block-categories-list li:first-child{border-top:none;}
.monograph-archive-categories .wp-block-categories-list a{font-family:var(--jnc-serif);font-size:15px;font-weight:400;color:var(--jnc-text);text-decoration:none;border-bottom:none;}
.monograph-archive-categories .wp-block-categories-list a:hover{color:var(--jnc-blue);}
@media(max-width:680px){
.monograph-archive-page{grid-template-columns:1fr !important;}
.monograph-archive-page > .monograph-archive-hero{grid-column:1;grid-row:1;}
.monograph-show-hero-right{grid-column:1;grid-row:2;padding-left:0;margin-top:1.25rem;}
.monograph-show-hero-left{grid-column:1;grid-row:3;padding-left:0;padding-right:0;margin-top:1.25rem;}
.monograph-show-art{width:140px;height:140px;max-width:140px;}
.monograph-archive-page > .monograph-archive-grid{grid-row:4;}
}
Featured Shuffle
Shortcode: [avf-layout name="Featured Shuffle" id="6a8d7c952d1f5"]
Used in:
page 10282 "Podcasts" (/podcast-episodes/)
- This View only runs JavaScript to shuffle the featured list, and it cannot be rebuilt without JavaScript. Either remove the shortcode and let the Query Loop use a fixed order (date, title and so on), or talk to the Commons team about a child theme.
Template:
<avf-layout-6a8d7c952d1f5 class="{{ _layout.classes }}jnc-shuffle"></avf-layout-6a8d7c952d1f5>
JavaScript:
var list = document.querySelector('.monograph-featured .monograph-archive-list');
if (!list) { return; }
var items = Array.prototype.slice.call(list.children);
for (var i = items.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
list.appendChild(items[j]);
items.splice(j, 1);
}