Utvikler cookbook

5.1.4. Article list news

 

Tittel: Article list news

Filnavn: eross-object-list-articles-news.tpl

 

{*
@title			Article list news
@description	Defalut article list. Supports manual URL
@type 			object
@compatibility 	EP_News,EP_NewsCopy,EP_NewsCopy_Multi
@bundle 		eross
*}
{foreach item=el from=$arr_items}
 {if $el.url_manual|trim != ''}
  {assign var=url value=$el.url_manual}
 {else}
  {assign var=urlA value='?article_id='}
  {assign var=url value=$urlA|cat:$el.id}
 {/if}

 <div class="blog-item medium clearfix">
  <div class="row">
   {if $el.smallpicture_exists == 1}
    <div class="col-lg-7 col-md-7">
   {else}
    <div class="col-xs-12">
   {/if}

    <div class="blog-header cleafix">
     <div class="post-content">
      <h2 class="entry-title">
       <a href="{$url}" title="{$el.header}">{$el.header}</a>
      </h2><!-- // .entry-title -->

      <div class="post-meta clearfix">
       <span class="time">
        <i class="fa fa-clock-o"></i>
        {$el.created|date_format:'%A %e. %B %Y &ndash; %H.%M'}
       </span><!-- // .time -->

       {if $el.attribs.metadata.author|trim != ''}
        <span class="author">
         <i class="fa fa-user"></i>
         {$el.attribs.metadata.author}
        </span><!-- // .author -->
       {/if}
      </div><!-- // .post-meta -->
			
      <div class="entry-summary">
       <p>{$el.abstract}</p>
      </div><!-- // .entry-summary -->
			
     </div><!-- // .post-content -->
    </div><!-- // .blog-header -->

   </div><!-- // end column -->

   {if $el.smallpicture_exists == 1}
    
    <div class="col-lg-5 col-md-5 bottom-20-sm bottom-20-xs">
     <div class="blog-media">
      <a href="{$url}" title="{$el.header}"><img alt="{$image.description}" src="{$image.url}" class="img-responsive"></a>
     </div><!-- // .blog-media -->
    </div><!-- // end column -->
   {/if}

  </div><!-- // .row -->

  <div class="blog-footer">
   <div class="row">
    {if $el.smallpicture_exists == 1}
     <div class="col-lg-7 col-md-7 text-right">
    {else}
     <div class="col-xs-12">
    {/if}				
     <span>
      <a title="{$el.readmore_text}" data-toggle="tooltip" href="{$url}" data-original-title="{$el.header}">
       {$el.readmore_text}
       {if $el.url_manual|trim != ''}
        &nbsp;<i class="fa fa-external-link-square"></i>
       {/if}
      </a>
     </span>
    </div><!-- // end column -->
   </div><!-- // .row -->
  </div><!-- // .blog-footer -->
 </div>
{/foreach}

{if $objectPagingInfo.numPages > 1}
 <div class="pagenavi">
  <ul class="cleafix">
   {if $objectPagingInfo.currentPage != 1}
    <li>
     <a href="{$baseUri}?{$objectPagingInfo.limitVariable}={$objectPagingInfo.limit}&amp;{$objectPagingInfo.offsetVariable}={$objectPagingInfo.offsetPrev}"><i class="fa fa-angle-left"></i></a>
    </li>
   {/if}

   {counter assign=offsetStep start=0 skip=$objectPagingInfo.limit}
   {section name=loop start=1 loop=$objectPagingInfo.numPages+1 step=1}
      <li>
       {if $objectPagingInfo.currentPage == $smarty.section.loop.index}
      <span class="current">{$smarty.section.loop.index}</span>
       {else}
        <a href="{$baseUri}?{$objectPagingInfo.limitVariable}={$objectPagingInfo.limit}&amp;{$objectPagingInfo.offsetVariable}={$offsetStep}">{$smarty.section.loop.index}</a>
       {/if}
      </li>
      {counter}
   {/section}

   {if $objectPagingInfo.currentPage != $objectPagingInfo.numPages}
    <li>
     <a href="{$baseUri}?{$objectPagingInfo.limitVariable}={$objectPagingInfo.limit}&amp;{$objectPagingInfo.offsetVariable}={$objectPagingInfo.offsetNext}"><i class="fa fa-angle-right"></i></a>
    </li>
   {/if}
  </ul><!-- // .clearfix -->
 </div>
 <div class="clearfix"></div>
{/if}

23.06.14

Hjelp / support

Jeg finner ikke det jeg leter etter

Vår dokumentasjon er stadig under utvikling. Vi endrer og legger til nye kapitler og bøker etter hvert som EasyPublish CMS endrer og vokser. Skulle du likevel ikke finne det du leter etter så ta kontakt med oss via support@escio.no.

Jeg har funnet en feil

Hvis du har funnet en feil i vår dokumentasjon så ønsker vi å rette på den. Send oss et hint til support@escio.no.

Translate

You can translate this documentation by using Google Translate. Select your language:

×