Moin
13 Junio, 2025 20:59
3
¿Dónde quieres usarlo?
El tema tipo Reddit, por ejemplo, usa discourse/helpers/base-path en la plantilla para crear el enlace “la lista de categorías” en el mensaje de bienvenida de la derecha.
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}}
También hay ejemplos donde se usa discourse/lib/get-url para obtener la URL en una función de JavaScript.
5 Me gusta