Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

Commit c41e47f

Browse files
authored
enable noHeadshot option and update README (#54)
1 parent e3c2541 commit c41e47f

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,14 @@ Example of a teaser with an image;
9292
```
9393
The `colspan`, `position` and `widths` arguments are passed on to `n-image` to determine the properties of how the image is displayed in the teaser.
9494
More details on what is supported by `n-image` can be found in that repository.
95+
96+
###Display options
97+
Parameters can be passed to suppress some elements of teasers that would otherwise appear.
98+
99+
####Elements that rely on presenter logic
100+
- Related Content (on TopStory teasers) - set `noRelatedContent = true`
101+
- Tag (on all teasers) - set `noTag = true`
102+
- Author Headshot (on Light, Standard and Lifestyle teasers) - set `noHeadshot = true`
103+
####Elements that are not transformed by presenter logic
104+
- Standfirst - set `standfirst = false`
105+
- Main Image - set `mainImage = false`

templates/partials/headshot.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
{{#with @nTeaserPresenter.headshot}}
2-
<img src="{{src}}" alt="Photo of {{alt}}" class="o-teaser__headshot">
3-
{{/with}}
1+
{{#unless noHeadshot}}
2+
{{#with @nTeaserPresenter.headshot}}
3+
<img src="{{src}}" alt="Photo of {{alt}}" class="o-teaser__headshot">
4+
{{/with}}
5+
{{/unless}}

0 commit comments

Comments
 (0)