Moin
Junho 13, 2025, 8:59pm
3
Onde você quer usá-lo?
O tema semelhante ao Reddit, por exemplo, usa discourse/helpers/base-path no template para criar o link “a lista de categorias” na mensagem de boas-vindas à direita.
tags: this.args.tag?.id,
});
}
<template>
{{#if this.isTopRoute}}
<div class="custom-right-sidebar_welcome">
<h2>{{i18n (themePrefix "top_route_welcome")}}</h2>
<p>
{{htmlSafe
(i18n (themePrefix "top_route_description") basePath=(basePath))
}}
</p>
{{#if (and this.currentUser this.currentUser.can_create_topic)}}
<DButton
class="btn-primary"
@id="custom-create-topic"
@action={{action "customCreateTopic"}}
@label="topic.create"
/>
{{/if}}
Existem também exemplos onde discourse/lib/get-url é usado para obter a URL em uma função JavaScript.
5 curtidas