wish: merge aggregator-wrapper.html.twig + aggregator-item.html.twig into "aggregator.html.twig"

markup

<section class="feed">

  <article>
    <h3><a href="feedurl">title</a></h3>
    <div class="content">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit
    </div>
    <footer>
      <time>date: xx xx xx</time>
      <div class="terms">Categories: foo, bar , baz</div>
      <a href="foo">bar</a>
    </footer>
  </article>

  <article>
    <h3><a href="feedurl">title</a></h3>
    <div class="content">
      Lorem ipsum dolor sit amet, consectetur adipisicing elit
    </div>
    <footer>
      <time>date: xx xx xx</time>
      <div class="terms">Categories: foo, bar , baz</div>
      <a href="foo">bar</a>
    </footer>
  </article>
    

</section>

twig stuff

{% if aggrerator %}
<section class="feed">

  {% for item in aggrerator %}
  <article>

    <h3><a href="{{ feed_url }}">{{ feed_title }}</a></h3>

    <footer>
      <time>{{ 'Date' | t }} {{ source_date }}</time>

      {% if categories %}
        <div class="terms">
        {% for item in categories %}
          {% if loop.first %}
             {{ 'Categories' | t }}
          {% elseif loop.last %}
            <li>{{ item }}</li>
          {% else %}
            <li>{{ item }} , </li>
          {% endif %}
        {% endfor %}
        </div>
      {% endif %}

      {% if source_url %}
       <a href="{{ source_url }}">{{ source_title }}</a> -
      {% endif %}
    </footer>

    {% if content %}
    <div class="content">
      {{ content }}      
    </div>
    {% endif %}

  </article>
  {% endfor %}


</section>
{% endif %}
CommentFileSizeAuthor
#4 aggregator-theme.patch15.44 KBgeoffreyr

Comments

geoffreyr’s picture

Assigned: Unassigned » geoffreyr
geoffreyr’s picture

Assigned: geoffreyr » Unassigned

Does the wrapper element account for the pager? Looks like it got left out of the wrapper.

As far as the implementation, I can't seem to enable the aggregator module right now...

mortendk’s picture

ups forgot about the pager gonna look into it asap

geoffreyr’s picture

Status: Active » Needs review
StatusFileSize
new15.44 KB

I kind of went a bit over the top here and converted a few extra templates. There are still some classic theme functions left in there, including theme_aggregator_page_opml which spits out XML. (Is there any way we can get Twig to handle that, or should we leave it to another subsystem of Drupal that actually generates nice XML? Views maybe?)

mortendk’s picture

the pager should be a general element that we can (re)use all over so i added it in as a seperate element in http://drupal.org/node/1913076

mortendk’s picture

Issue summary: View changes

added info about the files

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)