|
1 | 1 | {# ============================================================ |
2 | | - RELATED RESOURCES (skeleton) |
3 | | - Three columns: Case studies / White papers / Blog. |
4 | | - Driven by a tag passed in as `relatedTag` (e.g. "industry:food-beverage" |
5 | | - or "usecase:track-and-trace"). Resources opt in later by adding that tag; |
6 | | - the matching tag collection is then split by section. |
7 | | - No existing customer stories are tagged, so every column renders the |
8 | | - empty "More coming soon" state. |
| 2 | + RELATED RESOURCES |
| 3 | + Three columns: Case studies / eBooks and Whitepapers / Blog. |
| 4 | + Content opts in via a dedicated front matter field: |
| 5 | + usecase: |
| 6 | + - production-monitoring |
| 7 | + The layout passes `useCaseSlug` (e.g. "production-monitoring"). |
9 | 8 | ============================================================ #} |
10 | | -{% set relatedTag = relatedTag or "" %} |
11 | | -{% set tagged = collections[relatedTag] or [] %} |
12 | 9 |
|
13 | 10 | {% set caseStudies = [] %} |
14 | 11 | {% set whitepapers = [] %} |
15 | 12 | {% set blogPosts = [] %} |
16 | | -{% for item in tagged %} |
17 | | - {% if "/customer-stories/" in item.url %} |
18 | | - {% set caseStudies = (caseStudies.push(item), caseStudies) %} |
19 | | - {% elif "/whitepaper/" in item.url %} |
20 | | - {% set whitepapers = (whitepapers.push(item), whitepapers) %} |
21 | | - {% elif "/blog/" in item.url %} |
22 | | - {% set blogPosts = (blogPosts.push(item), blogPosts) %} |
| 13 | +{% for item in collections.all %} |
| 14 | + {% if item.data.usecase and useCaseSlug in item.data.usecase %} |
| 15 | + {% if "/customer-stories/" in item.url %} |
| 16 | + {% set caseStudies = (caseStudies.push(item), caseStudies) %} |
| 17 | + {% elif "/ebooks/" in item.url or "/whitepaper/" in item.url %} |
| 18 | + {% set whitepapers = (whitepapers.push(item), whitepapers) %} |
| 19 | + {% elif "/blog/" in item.url %} |
| 20 | + {% set blogPosts = (blogPosts.push(item), blogPosts) %} |
| 21 | + {% endif %} |
23 | 22 | {% endif %} |
24 | 23 | {% endfor %} |
25 | 24 |
|
26 | 25 | {% set columns = [ |
27 | 26 | {heading: "Case studies", items: caseStudies}, |
28 | | - {heading: "White papers", items: whitepapers}, |
| 27 | + {heading: "eBooks and Whitepapers", items: whitepapers}, |
29 | 28 | {heading: "Blog", items: blogPosts} |
30 | 29 | ] %} |
31 | 30 |
|
|
40 | 39 | <ul class="flex flex-col gap-3 list-none p-0 m-0"> |
41 | 40 | {% for item in column.items %} |
42 | 41 | <li> |
43 | | - <a href="{{ item.url }}" class="text-indigo-600 hover:text-indigo-800">{{ item.data.title }}</a> |
| 42 | + <a href="{{ item.url }}" class="text-indigo-600 hover:text-indigo-800">{{ item.data.title or item.data.meta.title or item.data.contentTitle | safe }}</a> |
44 | 43 | </li> |
45 | 44 | {% endfor %} |
46 | 45 | </ul> |
|
0 commit comments