weaveworks / wordepress

Tool support enabling hosting of technical documentation in WordPress
Apache License 2.0
7 stars 4 forks source link

Improve on no-items-found view loop hack #17

Closed awh closed 8 years ago

awh commented 8 years ago

The toplevel Wordepress Navigation view uses a filter which is guaranteed to return no documents as a way of obtaining non-looping behaviour via the no-items-found clause - apparently it is possible to have a view which does not loop at all, we should use that instead.

awh commented 8 years ago

This can be achieved simply by having the navigation cell of the layout point to a content template of the form

[wpv-view name="Wordepress Navigation H1"
    wpvproduct='[types field="product"][/types]'
    wpvversion='[types field="version"][/types]'] 

rather than to the Wordepress Navigation view as it does now. That view can then be removed entirely.