Skip to content

Commit

Permalink
Deployed 5cb7cb4 with MkDocs version: 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Dec 3, 2024
1 parent 9d721e0 commit 6ebfd0d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions csv_value_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1064,14 +1064,14 @@ <h2 id="applying-csv-value-templates-to-rows-in-your-input-csv">Applying CSV val
<li>You can only define a single template for a given field in <code>csv_value_templates</code>, but you can include multiple variables in a single template. If multiple variables are present in a template, they are applied in the order listed above.</li>
<li>If a CSV field contains multiple subvalues, the same template is applied to all subvalues in the field (as illustrated above).</li>
<li>Values in the templated CSV output are validated against Drupal's configuration in the same way that values present in your CSV are validated.</li>
<li>By default, CSV value templates won't be applied to empty fields. However, if you want a template to be applied to a field if that field is empty, you can include the <code>allow_csv_value_templates_if_field_empty</code> setting in your config file defining a list of column names. For example, <code>allow_csv_value_templates_if_field_empty: [field_identifier]</code> will apply any templates defined for <code>field_identifier</code> in your <code>csv_value_templates</code> setting, even if <code>field_identifier</code> is empty in your input CSV; for example, the following will apply templated defined in the above example configuration even if the named fields are empty:</li>
<li>By default, CSV value templates won't be applied to empty fields. However, if you want a template to be applied to a field if that field is empty, you can include the <code>allow_csv_value_templates_if_field_empty</code> setting in your config file defining a list of column names. For example, <code>allow_csv_value_templates_if_field_empty: [field_identifier]</code> will apply any templates defined for <code>field_identifier</code> in your <code>csv_value_templates</code> setting, even if <code>field_identifier</code> is empty in your input CSV; for example, the following will apply the template defined in the above example configuration even if the named fields are empty:</li>
</ul>
<pre><code>allow_csv_value_templates_if_field_empty: ['field_local_identifier', 'field_subject']
</code></pre>
<h2 id="applying-csv-value-templates-to-paged-content">Applying CSV value templates to paged content</h2>
<p>Paged content (or as sometimes referred to, children) created using the "<a href="/islandora_workbench_docs/paged_and_compound/#using-subdirectories">Using subdirectories</a>" method do not have their own rows in input CSV files. Any fields that are configured to be "required" in the parent and child's content type are copied from the parent's CSV row and applied to all that parent's pages/children. If you want to add non-required field data to pages/children, However, you can use CSV value templates to do that. In this case:</p>
<ul>
<li>the CSV row that is used as the source of <code>$csv_value</code> is the page's (or child's) parent row; the value is inherited from this parent row</li>
<li>the CSV row that is used as the source of <code>$csv_value</code> is the page's (or child's) parent row; in other words, the value of <code>$csv_value</code> is inherited from a page/child's parent row</li>
<li>the <code>$file</code> variable is the name of the page/child's filename (and <code>$filename_without_extension</code> is derived from this value)</li>
<li>the <code>$weight</code> variable is taken from the page/child's sequence indicator, e.g. a filename of <code>page-002.jpg</code> would result in a <code>$weight</code> value of "2".</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions paged_and_compound/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@
</li>

<li class="md-nav__item">
<a href="#field-data-applied-to-pageschildren-created-from-subdirectories" class="md-nav__link">
Field data applied to pages/children created from subdirectories
<a href="#applying-field-data-to-pageschildren-created-from-subdirectories" class="md-nav__link">
Applying field data to pages/children created from subdirectories
</a>

</li>
Expand Down Expand Up @@ -1101,8 +1101,8 @@
</li>

<li class="md-nav__item">
<a href="#field-data-applied-to-pageschildren-created-from-subdirectories" class="md-nav__link">
Field data applied to pages/children created from subdirectories
<a href="#applying-field-data-to-pageschildren-created-from-subdirectories" class="md-nav__link">
Applying field data to pages/children created from subdirectories
</a>

</li>
Expand Down Expand Up @@ -1255,7 +1255,7 @@ <h4 id="filename-conventions">Filename conventions</h4>
<li>If your page directories contain files other than page images, you need to include the <code>paged_content_image_file_extension</code> setting in your configuration. Otherwise, Workbench can't tell which files to create pages from.</li>
<li>If you don't want to use your <code>id</code> column to name the directories that contain each item's pages, you can include <code>page_files_source_dir_field: directory</code> to your config file and add a <code>directory</code> column to your input CSV to name the directories.</li>
</ul>
<h4 id="field-data-applied-to-pageschildren-created-from-subdirectories">Field data applied to pages/children created from subdirectories</h4>
<h4 id="applying-field-data-to-pageschildren-created-from-subdirectories">Applying field data to pages/children created from subdirectories</h4>
<p>Titles for pages are generated automatically using the pattern <code>parent_title</code> + <code>, page</code> + <code>sequence_number</code>, where "parent title" is inherited from the page's parent node and "sequence number" is the page's sequence. For example, if a page's parent has the title "How to Write a Book" and its sequence number is 450, its automatically generated title will be "How to Write a Book, page 450". You can override this pattern by including the <code>page_title_template</code> setting in your configuration file. The value of this setting is a simple string template. The default, which generates the page title pattern described above, is <code>'$parent_title, page $weight'</code>. There are only two variables you can include in the template, <code>$parent_title</code> and <code>$weight</code>, although you do not need to include either one if you don't want that information appearing in your page titles.</p>
<p>Fields on pages that are configured to be required in the parent and page content type are automatically inherited from the parent. No special configuration is necessary.</p>
<p>Finally, even though title and Islandora model (along with required fields) are automatically added to pages/children, you can add additional (non-required field) metadata to pages/children using <a href="/islandora_workbench_docs/csv_value_templates/#applying-csv-value-templates-to-paged-content">CSV value templates</a> during the <code>create</code> task that creates the pages.</p>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 6ebfd0d

Please sign in to comment.