dont create dropdown on singleton tag entries
This commit is contained in:
parent
4f2868fad5
commit
2be63d85a8
@ -192,8 +192,12 @@ main =
|
|||||||
, constField "route" navRoute
|
, constField "route" navRoute
|
||||||
, listField "posts" (constField "tag" tag' <> constField "route" navRoute <> postContext) (metadataSort =<< mapM load ids)
|
, listField "posts" (constField "tag" tag' <> constField "route" navRoute <> postContext) (metadataSort =<< mapM load ids)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
tagNavTemplate
|
||||||
|
| length ids > 1 = "templates/tag-nav.html"
|
||||||
|
| otherwise = "templates/tag-nav-singleton.html"
|
||||||
tagItem'
|
tagItem'
|
||||||
>>= loadAndApplyTemplate "templates/tag-nav.html" tagNavCtx
|
>>= loadAndApplyTemplate tagNavTemplate tagNavCtx
|
||||||
>>= normalizeUrls
|
>>= normalizeUrls
|
||||||
postContext =
|
postContext =
|
||||||
mconcat
|
mconcat
|
||||||
|
|||||||
5
templates/tag-nav-singleton.html
Normal file
5
templates/tag-nav-singleton.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<li class="nav-link">
|
||||||
|
<a class="nav-link" href="$route$">
|
||||||
|
$title$
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
Loading…
Reference in New Issue
Block a user