Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Last active August 29, 2015 14:07
Show Gist options
  • Save DeskWOW/a986c46fcf3a91abcf4e to your computer and use it in GitHub Desktop.
Save DeskWOW/a986c46fcf3a91abcf4e to your computer and use it in GitHub Desktop.
Page (Index) modified to list brand links if the current brand is titled "Home"
<div id="desk-external-variables-page_index" class="desk-external-variables">
<div id="system-snippets-just_moderated">{{just_moderated}}</div>
</div>
{{ search_form_begin }}
<div class='outer'>
<div class='inner'>
<input type='text' id='q' name='q' maxlength='100' value='' />
{{template_form_params}}
<div id='question-mask' class='question-big'>{{system.snippets.have_a_question}}</div>
<input type='submit' id='support-search-submit' value='{{system.snippets.search}}' />
</div>
</div>
{{ search_form_end }}
<div id='support-main'>
{% if just_moderated %}
<div id="modal-screen">&nbsp;</div>
<div id="modal">
<div class="inner">
<div class="main">
<h1>{{system.snippets.your_post_submitted}}</h1>
<p class='subheader'>
{{system.snippets.not_shown_until_reviewed}}
</p>
<div id='form'>
<div class='input-button'>
<input id='moderation_okay_button' name='commit' type='submit' value='{{system.snippets.okay}}' />
<img alt='Ajax-loader-small' id='question_submit_spinner' src='{{ "/images/ajax-loader-small.gif" | portal_image_url: image_asset_host }}' style='display: none; margin: 7px 0 0 5px; position: absolute;'/>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<div class='support-body'>
<div class='content dashboard'>
{% if desk.current_brand.name == "Home" %}
Home
{% else %}
<h3>{{system.snippets.browse_by_topic}}</h3>
{% if topics_count > 0 %}
<table width='100%' cellspacing='0'>
{% tablerow topic in topics cols: 2 %}
<div class='topic topic{{ topic.id }}'>
<h4>{{ topic.name }}</h4>
{% if topic.article_count > 0 %}
<h5 class='articles'>
{{ topic.article_count }}
{{ system.snippets.article | pluralize: topic.article_count, system.snippets.articles }}
<a href='{{ topic.public_articles_url }}'>{{system.snippets.view_all}}</a>
</h5>
<ul>
{% for article in topic.articles limit:5 %}
<li>
<a href='{{ article.public_url }}'>{{ article.subject_plain | clip:40 }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if portal.questions_enabled %}
{% if topic.question_exists and topic.allow_questions %}
<h5 class='questions'>
{{system.snippets.recent_qna}}
<a href='{{ topic.public_questions_url }}'>{{system.snippets.view_all}}</a>
</h5>
<ul>
{% for question in topic.questions limit:5 %}
{% if question.featured? %}
<li class='featured'>
<a href='{{ question.public_url }}'>{{ question.subject_plain | clip:40 }}</a>
</li>
{% else %}
<li>
<a href='{{ question.public_url }}'>{{ question.subject_plain | clip:40 }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endif %}
</div>
{% endtablerow %}
</table>
{% else %}
<h4>{{system.snippets.no_topics_avail}}</h4>
{% endif %}
{% endif %}
</div>
</div>
<!-- GS -->
{% if desk.apps.get_satisfaction.enabled %}
<div id='support-main' style='margin-top:20px;'>
<div class='support-body'>
<div class='content dashboard'>
<h3>{{system.snippets.community_discussions}}</h3>
<table id="gs-table" width='100%' cellspacing='0'>
<tr class="row1">
<td class="col1" width="50%">
<div id="gs_questions">
<img alt='Ajax-loader-small' id='question_submit_spinner' src='{{ "/images/ajax-loader-small.gif" | portal_image_url: image_asset_host }}' style='display:block;margin:auto;' />
</div>
</td>
<td class="col2">
<div id="gs_ideas">
<img alt='Ajax-loader-small' id='question_submit_spinner' src='{{ "/images/ajax-loader-small.gif" | portal_image_url: image_asset_host }}' style='display:block;margin:auto;' />
</div>
</td>
</tr>
<tr class="row2 last">
<td class="col1">
<div id="gs_problems">
<img alt='Ajax-loader-small' id='question_submit_spinner' src='{{ "/images/ajax-loader-small.gif" | portal_image_url: image_asset_host }}' style='display:block;margin:auto;' />
</div>
</td>
<td class="col2">
<div id="gs_praises">
<img alt='Ajax-loader-small' id='question_submit_spinner' src='{{ "/images/ajax-loader-small.gif" | portal_image_url: image_asset_host }}' style='display:block;margin:auto;' />
</div>
</td>
</tr>
{{gs_scripting}}
</table>
</div>
</div>
</div>
{% endif %}
<!-- GS -->
<!--
***************
The following attribution needs to remain as is in terms of wording with the appropriate link back to desk.com as per our terms of service: http://www.desk.com/terms
If you would like, you may change the location or the styling to better match your site, but the content and the link must remain in the template and visible to end users.
****************
-->
<div id='footer'>
{{ desk.page.theme.footer_content }}
<br/>
<a href='http://www.desk.com'>Customer service software</a> powered by Desk.com
</div>
</div>
<script type="text/javascript" src="{{desk_javascript_host}}portal/desk.portal.body.page_index.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment