Recent searches
No recent searches
Changing Homepage "Categories" to "Sections"
Answered
Posted Aug 31, 2016
On the Homepage currently the categories variable is used to display the categories of the Knowledge BaseI've scoured through https://developer.zendesk.com/apps/docs/help-center-templates/home_page however can't currently see a way to replace the display of categories with the display of sections.
Alternatively, what is the best approach for migrating the content of the 2 column category page (in the Copenhagen theme) to the Main Page rather than internal page.
0
17
17 comments
ModeratorWes
@Michael - So instead of showing categories you would like to show the sections there. I also have an accordion setup in the Copenhagen theme, you can see it here. With that being said it is possible to pull in sections.
0
qa
is there a way to customize the column width in Copenhagen theme?
currently, if there are 4 categories, the first 3 categories will be in the same row, but the last one will be in the second row and has width of 3 columns like seen in first row, is there a way to make it the same width as seen in the first row's column?
thanks for the tips =)
0
Dan Kemp
Did we find a way to display sections instead of categories as Michael asked? I'd like to do that too.
0
Amy Phillips
I would like to do this as well: have ONE category, then show the sections on the home page. Is this possible? if so, how?
Thanks!
0
ModeratorWes
@Amy - If you only have one category then all of your sections will show on the home page. The sections will show in the boxes just like categories would. By default, the code says if you only have one category then don't show the category and show the sections instead. By the way, this is how it works for the Copenhagen theme so please ensure you are using that theme.
0
Shane
I realize this thread is old; however, I have a somewhat related question. I'd like to add a particular section to the homepage and list the first (X) articles from said section. I've been combing the help docs but so far have come up empty. Any ideas? Should I start a new thread?
0
Jessie Schutz
Hi Shane!
I imagine this could be possible with custom code...let me check with some of our Community Moderators to see if they can shed any light on it.
0
Sven Cune
Hi there, I would like to achieve the same as Shane. Do you happen to have an update on this Jessie?
Thank you!
0
ModeratorWes
@Shane and Sven - Why not make the articles promoted from that section and then let them show in the promoted articles area. That will accomplish the same thing that you are asking unless you have other promoted articles. If you want to pull articles from a section then you will need to use the {{is}} curlybar in order to accomplish that.
0
Sven Cune
@Wes, thank you for your reply! In my particular case I use the promote articles feature to highlight articles that are most relevant from a content perspective. Besides the promoted articles I want to have an Announcement section on the page that shows the latest 5 articles in that section with the newest at the top.
I tried to use the following curlybar for this, but the following only works on the category, section and article templates I believe?
Any tips on how to display section content on the homepage would be great!
0
Sven Cune
I managed as follows:
0
ModeratorWes
@Sven - That will work, its very similar to the code I used. Here is what I used which I pull the same information: As you can I grabbed the catgory ID that the section it belongs to in case you want to display anything about the category.
{{#each categories}}
{{#is id 115001216103}}
{{#each sections}}
{{#is id 115001526163}}
<h2 class="" data-target="{{id}}-articles">{{name}}</h2>
{{/is}}
{{/each}}
<section class="articles">
{{#each sections}}
<section id="{{id}}-articles" class="" style="{{#isnt id 115001526163}} display:none;{{/isnt}}">
{{#if articles}}
<ul class="article-list promoted-articles">
{{#each articles}}
<li class="promoted-articles-item">
{{#if promoted}}
<span data-title="{{t 'promoted'}}">★</span>
{{/if}}
<a href="{{url}}">{{title}}</a>
</li>
{{/each}}
</ul>
{{/if}}
</section>
{{/each}}
{{/is}}
{{/each}}
</section>
0
Mike Tamosaitis
Wes,
Is there a way to break up the categories Like the picture below?
0
Jessie Schutz
Hi Mike!
There's a thread about using category images over here...that should get you most of the way there!
0
ModeratorWes
@Mike sure you can divide things up. You would just have to use some if statements to only call the sections for those categories.
@ Jessie - the better post for images is here.
0
Mike Tamosaitis
@Wes,
Question, if I am trying to break up the layout of the categories on the home page why would I call the sections?
0
Trapta Singh
Hi @Christer,
If you are using Copenhagen theme then it will be available there by default. If not, then you can do this by adding
after line no. 15 and line no. 28 in home_page.hbs template.
Let me know if you face any issue.
Team Diziana
0