Theme: Code Snippets for Dynamic Content ======================================== You can pull various pieces of dynamic content into your Tendenci theme template. Before adding the snippets below be sure that your template file has the "load" tag for that module at the top of your page. Example: if you were to add an event feed you would want `{% load event_tags %}` pasted at the very top of your html doc. For more tag references, check out the docs built into your site at: yourdomain/admin/doc/tags/ Event Feed ------------ Add `{% load event_tags %}` to the very top of your html page Then add the following code snippet where you want to place your event feed: .. code-block:: django {% list_events as events_list limit=3 %}
{{ event.start_dt|date:"F d, Y" }}
{{ event.description|striptags|truncatewords:"30"|safe }}
{% now "F d, Y" %}
This is example of what your event description will look like. Where is this text source?. Start adding Events to start adding your own content today!
{% if request.user.is_authenticated %}Display your next upcoming event right on your homepage. Once you add your first event, this area will be replaced by that information. Don't forget to add an evennt photo!
{% endif %}Online Donations from supporters like you allow us to achieve our purpose throughout the year. We appreciate your generous donation; please donate today using our simple online donation!
.. hidden-code-block:: css :label: + Show Added CSS /* BG-DARK HOMEPAGE */ .bg-dark { padding: 20px 10px 50px 20px; background: #2b2b2b; } #box-5 , #box-4 { border: 1px solid #54b848; border-radius: 8px; margin:20px; background-color: #323232; } #box-5 h3 { font-size: 45px; text-transform:none; border-bottom: 1px solid #54b848; padding:0 0 10px 30px; width:100%; font-family: FontAwesome, "Assistant", sans-serif; font-weight:600; color: #54b848; } #box-4 h3 { font-size: 45px; text-transform:none; padding:0 0 0 30px; width:100%; font-family: FontAwesome, "Assistant", sans-serif; font-weight:600; font-size:35px; color: #54b848; } #box-5 p>a { background-color: #54b848; color: white; text-align: center; padding: 10px 20px; border-radius: 8px; font-weight:600; text-transform: uppercase; float: right; position: relative; left: -20%; font-size: 20px; } #box-5 p>a:hover { text-decoration:none; background-color: #3333ff; } #box-4 p>a { color:#54b848; font-weight:600; font-size:18px; } #box-5 p { font-weight:200; padding: 10px 30px 0 30px; } #box-4 p { font-weight:200; padding: 0px 30px 0 30px; } Bootstrap Carousel ------------------ Add `{% load story_tags %}` to the very top of your html page Then add the following code snippet where you want to place your carousel: .. code-block:: django {% list_stories as stories_list limit=10 tags="rotator" quality="80" data-interval="5000" %} Directories Carousel -------------------- Add `{% load directory_tags %}` to the very top of your html page Then add the following code snippet where you want to place your directories: .. code-block:: django
{{ job.location }}
{% empty %}Houston: A new job opening is available...
{% endfor %} Simple Job Feed Layout .. image:: img/jobboard.png .. Tip:: .. hidden-code-block:: django :label: + Show HTMLLearn more and post a job.
Search our jobs board and find a job.
{{ job.description|striptags|truncatewords:"10"|safe }}
Posted on: {% now "M d" %}
{% blocktrans with c=news_item.summary|striptags|safe|truncatewords:"30" %} {{ c }} {% endblocktrans %}
{{ entry.title }}
Posted Date: {{ entry.updated_parsed|rss_date:"F j, Y" }}