profile.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {% extends "coderedcms/pages/web_page.html" %}
  2. {% load static %}
  3. {% load wagtailcore_tags %}
  4. {% block index_content %}
  5. <h2>
  6. PROFILE PAGE
  7. </h2>
  8. <div>
  9. {% with media=page.featured_media %}
  10. <{{ media.type }} controls poster="{{ media.thumbnail.url }}">
  11. {% for source in media.sources %}
  12. <source src="{{ source.src }}" type="{{ source.type }}" />
  13. {% endfor %}
  14. </{{ media.type }}>
  15. {% endwith %}
  16. </div>
  17. <div>
  18. {{ page.intro|richtext }}
  19. </div>
  20. <p>
  21. User Id: {{ user_id }}
  22. <p>
  23. Is Me: {{ is_me }}
  24. {{ block.super }}
  25. <h3>1: from page</h3>
  26. <p>Live? {{ page.live }}</p>
  27. <p>Preview? {{ page.preview }}</p>
  28. <ul>
  29. {% for tweet in tweets %}
  30. <li><a href="https://twitter.com/x/status/{{ tweet.id }}">{{tweet.text}}</a></li>
  31. {% endfor %}
  32. </ul>
  33. <h3>2: from block value</h3>
  34. {% for block in page.intro2 %}
  35. {% if block.block_type == 'tweet_query_block' %}
  36. {{ block }}
  37. tweets = {{ block.value.tweets }}
  38. {% endif %}
  39. {% endfor %}
  40. <h3>3: generic block rendering</h3>
  41. {{ page.intro2 }}
  42. {% endblock %}