Portal liquid template.

  • 19 May 2022
  • 1 reply

Hi all.

I face with an problem implementing a custom theme for our portal home page.
we try to display a list of categories. each item need to link the category page with a list of articles.
out template look like this:

{% for category in portal.solution_categories %}
{% if category.folders_count > 0 %}
<div class="item">
<a href="{{category.url}}">
<img src="example.png" alt="{{}}" />
{% endif %}
{% endfor %}

the the problem is with the URL generated from category.url.

the generated URL is incorect and point to not existing page which lead to 
redirect back to home page.

generated URL example: /support/solutions/72000072176

the original templete generate rigth URL: /support/solutions/folders/72000105646
original template example:
{{ | link_to: category.url }} 
(which is just a wrapper for the name)

	{% for category in portal.solution_categories %}
{% if category.folders_count > 0 %}
<div class="cs-s">
<h3 class="heading">
{{ | link_to: category.url }}
<div class="cs-g-c">
{% for folder in category.folders %}
<section class="cs-g article-list">
<div class="list-lead">
{{ folder | link_to_folder_with_count }}
{{ folder | sub_folder_article_list:5 }}
{% else %}
{{ portal | filler_for_solutions }}
{% endfor %}
{% endif %}
{% endfor %}

how can i check whats the problem with the link generation?

templete creation was referenced from this doc and copyed from the original theme.



1 reply

Badge +1

@Shimon Did you ever find a solution to this problem?

I’m actually trying to do this display but only for the category & folders that the current article is inside of. Do you know how I’d tweak this code to work for that?