Forum Discussion

davidsand's avatar
3 years ago

Featured Topic Component Not Showing

My code is not pulling the featured topics that are listed in admin. I'm sure it might be referencing something incorrectly. Any help would be appreciated. 

 

 

<#if featuredTopicsSetting?length gt 0>
	<#assign featuredTopics = featuredTopicsSetting?split(",") />
	<#assign topicList = "" />
	
	<#list featuredTopics as featuredTopic>
		<#assign topicList = topicList + "'" + featuredTopic?trim + "'" />
		<#if featuredTopic_has_next>
			<#assign topicList = topicList + "," />
		</#if>
	</#list>
	
	<#assign qry = "SELECT subject, view_href FROM messages WHERE id IN (${topicList})" />
	<#assign topicsAr = executeLiQLQuery(qry) />
	
	<#if topicsAr?size gt 0>
		<@generateComponentContent className="custom-featured-topics" componentTitleKey="theme-lib.featured_topics.title">
		  <div class="featured-users-container">
		    <#list topicsAr as featuredTopic>
					<div class="custom-featured-topic">
						<a href="${featuredTopic.view_href}">${featuredTopic.subject}</a>
					</div>
		    </#list>
		  </div>
		</@generateComponentContent>
	</#if>
</#if>

 

 

 

No RepliesBe the first to reply