커스텀 헤더 컴포넌트를 사용하여 헤더에 외부 링크를 추가하고 있습니다. 또한, 각 사용자의 프로필 링크가 고유한 별도 웹사이트로 연결되는 사용자 필드도 있습니다. 이 고유한 링크에 접근하여 Discourse의 커스텀 헤더 링크 컴포넌트에서 해당 링크를 사용할 수 있는 방법이 있을까요?
이 질문에 몇 번이나 답이 올라온 적이 있습니다. 제 이해를 바탕으로 짧게 답하자면, 아니요. 다만 자바스크립트를 조금 사용해야 할 수도 있습니다. 그리고 도움이 된다면 "좋아요"를 눌러주셔야 할 기능 요청사항도 있습니다.
I would like to insert a system variable in a post (for example site_name).
If our site_name is OJODIGITAL, I had expected that when I insert in a post this text site_name would have been substituted for OJODIGITAL, but it is not.
Hello friend, in our site %{site_name} you can see ….
I have seen this kind of constructions in text customization messages (site adjustments/Customize/Text).
Is it possible to do that? How?
This is not possible at the current time.
Here is my (somewhat clumsy) solution, in case it helps someone. I added this code under Admin > Customize > Themes > Edit CSS/HTML > /head:
<script type="text/discourse-plugin" version="0.8">
api.decorateCooked($elem => {
var i, j;
var selector = 'https://example.typeform.com';
// seems like this should work but it doesn't:
// var typeforms = $elem[0].querySelectorAll('src^=[' + selector + ']');
var ps = $elem[0].querySele…
It would be great to be able to insert a system variable in a post (for example site_name).
If our site_name is OJODIGITAL, I had expected that when I insert in a post this text site_name would have been substituted for OJODIGITAL, in a similar way that can be done in text customization (site adjustments/customize/text)
Hello friend, in our site %{site_name} you can see ….
1개의 좋아요