preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

allow LinkTree elements to be coerced from LinkArray definitions #553

Closed jberger closed 6 years ago

jberger commented 6 years ago

When trying to add children to a link inside of a navigation, the children aren't coerced. This is because the links in navigations are coerced down a chain to only Link object and not LinkTrees. In this coercion, if the input data is a hash reference and if has a key children then it is coerced to a LinkTree instead. This allows my template with nested navigation dropdowns to work as documented in your page http://preaction.me/statocles/docs/config

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 92.053% when pulling aa7e35209588de60fe01a2c19fc96d5bf9f37228 on jberger:jberger/feature/LinkTree_coercion into ff5fc5c987e6a86ebf11c0a719de3a8c26153e2e on preaction:master.