這是我的layout.html
代碼,我想知道如何增加它,以便<div class="navbar"> ... </div>
只顯示用戶是否通過上面{{>loginButtons}}
登錄。另外,當用戶成功登錄時,如何路由到由其中一個按鈕觸發的路線?顯示按鈕,如果登錄,流星的Spacebars
<body>
{{renderPage}}
</body>
<template name='layout'>
<div class="layout-buttons">
{{> loginButtons}}
</div>
<div class="navbar">
<div class='btn' id='left'><a class='button-text' href="{{pathFor 'home'}}">home</a></div>
<div class='btn' id='right'><a class='button-text' href="{{pathFor 'speakers'}}">myKaleo</a></div>
</div>
{{> yield}}
</template>
'{{#if currentUser}} your code {{/ if}}'。我們不會爲你寫代碼,你可以幫助你 – Sindis 2015-02-10 23:13:04