News ====== The News app can be displayed in multiple ways on Tendenci through: News Feed, News Search, and News Article Views. To learn more about adding a News Feed to different pages, go to: http://tendenci.readthedocs.io/en/latest/templating/theme_code_snippets.html#news-feed-with-thumbnail-image To change the look of the News Search Results page, pull down these two templates: ``search-result.html`` and ``search.html`` The overall page layout is dictated by ``search.html``. The look of the news results can be changed through the ``search-result.html`` template. Social Sharing Links -------------------- You can add social sharing links to the New's module meta.html or view.html to allow users to share the specific news articles they are viewing on your site. Facebook .. code-block:: html   Twitter .. code-block:: html   Linkedin .. code-block:: html   Adding a Thumbnail ------------------ .. image:: img/newsthumbnail.png .. Tip:: To add the thumbnail image to ``search-result.html``, use this code: .. hidden-code-block:: html :label: + Show Added HTML / Django Template Tags {% if news.thumbnail %}
{{ news_item.headline|striptags|safe }}
{% endif %} Blog Styling: Show Image in the News Article -------------------------------------------- .. image:: img/blogstyle.png .. Tip:: By default, the Tendenci code in ``search-result.html`` might look something like this: ``{% blocktrans with s=news.body|striptags|truncatewords:20|safe %}{{ s }}{% endblocktrans %}`` To achieve the look of a blog, you can remove "striptags" to reveal images, links, and headings within your news article content.: ``{% blocktrans with s=news.body|truncatewords:100|safe %}{{ s }}{% endblocktrans %}``