이 테마 컴포넌트를 설치하여 활성 테마에 추가하면 '홈페이지’를 제어할 수 있습니다. 이를 통해 디스코스가 기본적으로 허용하는 페이지 세트와 다른 홈페이를 설정하거나, 서로 다른 그룹이 각기 다른 "홈페이지"를 가질 수 있도록 할 수 있습니다(예: 그룹 구성원이 특정 카테고리에만 관심이 있거나 주로 해당 카테고리를 사용하는 경우). 이는 모든 사용자, 익명 사용자(로그인하지 않은 사용자), 모바일 사용자, 또는 사용자의 기본 그룹에 따라 적용될 수 있습니다. @pfaffman이 최초 개발했습니다. User-specific Discourse home page 를 참고하세요.
사용 사례:
‘일반적인’ 홈페이지가 아닌 다른 것을 원할 때
익명 사용자를 위한 다른 홈페이지를 원할 때
모바일 사용자를 위한 다른 홈페이지를 원할 때
인스턴스의 일부 기능에만 관심이 있는 사용자 그룹이 있을 때. 그들은 자신의 특정 카테고리만 보고 싶어 합니다.
사용자 그룹을 임시로 특별 이벤트 등으로 리디렉션할 때
서로 다른 그룹을 위한 다른 랜딩 페이지를 설정할 때
설정
사용자 지정 기본 홈페이지
전체 사용자 지정 홈페이지를 설정할 수 있습니다.
익명 페이지
사이트에 로그인하지 않은 사용자를 위해 지정된 페이지를 사용하도록 설정할 수 있습니다. 위의 전역 설정을 우선하여 적용됩니다.
모바일 홈페이지
Force Mobile Homepage 와 마찬가지로, 모바일 사용자를 위한 다른 홈페이지를 설정할 수 있습니다. 이는 위에서 선택한 옵션들을 우선하여 적용됩니다.
그룹 페이지 맵
여러 항목을 허용합니다. 각 항목은 group_name:path 형식이어야 하며, 여기서 group_name은 그룹 슬러그(그룹 전체 이름이 아님)이고 path는 원하는 홈페이지입니다(예: “/c/great-category/4”).
Hello!! This is awesome!!
Thank you very much, this is actually important for my my case (use-case 1).
I have to ask, about " The users with a specified group as primary will not be able to reach your ‘normal’ homepage", what do you mean by “actively provide a way for them to do that” ?
Also, in line with this concept, it will also be useful to show in the homepage a specific order of the categories depending on which group the user belongs to. For example, to show their category at the top, and all the rest below of that. Do you think this is possible? (if not already?).
It means that whatever home page you set in the site settings will be overridden. So if you want users to be able to get there then you’ll need to see that there is a link to get there… Somehow.
I can’t imagine how that would work (maybe I have a bad imagination ). The use case that I can think of makes users have a different category set as home if the are in a group. Like a car site could let you choose the Ford group as your home page.
If you want different stuff available for different groups then I think you’d do that by having default muted categories.
Hi Jay!
Thank you for your answer
Lets say I would like to have different categories “pinned” at the top depending to which group a user belongs to. I mean, each different user would see a different “pinned” category. I don’t want to hide the other categories from the user, just make easily visible and readily available the one they will be using the most, right from the homepage (if possible!).
(of course, I’m not “demanding” anything here, just asking if it’s possible with available settings/components)
In my case I set up my advertiser’s client category as homepage with this TC, but they just found it confusing and asked me to remove it again. Hence I think the showcased categories tc with such a modification would be the perfect solution.
Hi @jrgong!
Thank you very much for pointing me to that topic! And yes! That would be just perfect! I’m moving there to support the idea
Thank you again!
Are you sure that’s the most recent version in github? (Not your fork or a static/local version?) I just ran an upgrade and it’s working. Also looking at the code, there’s only one place where api is used:
That is odd. I’ve removed it from that instance anyway as it was surplus. And it seems to be working fine after updating in another instance. Weird. Thanks for taking a look!
Any idea how it interacts with the sidebar? I need to give it a whirl as it looks like the issue of needing a route back to the forum home has been solved by it.
Yeah, the same theme works fine when logged in, just not for anon. And just to be sure: the relative URL needs to start with a /? Asking because Jammy used tag/featured/ while I use /c/artwork/8.
I got this to work - it was a mistake on my end.
Perfect, thanks! It’s not showing for me as an update yet though - should it?
The way you have it configured won’t work as users can’t have any of the trust_level groups as their primary group.
Thinking about that - is it added to the default theme for the site (anon uses this)? I’ve been tripped up by adding a component to my ‘dev’ theme but not the default theme.