<html xmlns="http://www.w3.org/1999/xhtml"
      metal:use-macro="here/main_template/macros/master">

  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <metal:block metal:fill-slot="javascript_head_slot">
      <script type="text/javascript" tal:attributes="src string:${portal_url}/cart_widgets.js"></script>
      <script type="text/javascript" tal:attributes="src string:${portal_url}/photo_lightbox_viewer.js"></script>
    </metal:block>
    <title>portfolio_view</title>
  </head>

  <body i18n:domain="portfolio">
    <div metal:fill-slot="header" tal:omit-tag="" tal:condition="not:here/hasPresentationPage">
      <h1 id="DesktopTitle">
        <span tal:replace="here/title_or_id">Page Title</span>
      </h1>
      <div id="DesktopDescription" tal:content="structure here/Description">
        Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test.
      </div>
    </div>

    <div metal:fill-slot="main" tal:omit-tag=""
         tal:define="ModifyPortalContent modules/Products/CMFCore/permissions/ModifyPortalContent;
                     ctool nocall:here/portal_catalog;
                     slide_size portal_object/slide_size;
                     Batch python:modules['Products.Plinn'].Batch;
                     pho_start python:0;pho_start request/pho_start | pho_start;
                     port_start python:0;port_start request/port_start | port_start;
                     portfolios python:Batch(here.listNearestFolderContents(contentFilter={'portal_type' : 'Portfolio'}),
                                             16, port_start, orphan=1, quantumleap=1, b_start_str='port_start');">
    <div tal:condition="python:here.hasPresentationPage() and pho_start < 20"
     tal:content="structure here/presentation_page">custom presentation</div>
    <div tal:condition="portfolios" tal:omit-tag="">
      <div tal:define="batch portfolios" tal:omit-tag="">
        <div metal:use-macro="here/batch_macros/macros/navigation">batch navigation</div>
        <div class="portfolio_lightbox">
          <a tal:repeat="portfolio batch"
             tal:attributes="href portfolio/absolute_url">
            <span tal:define="sphoto portfolio/samplePhoto" tal:omit-tag="">
              <span tal:condition="sphoto" tal:omit-tag="">
                <img tal:attributes="src sphoto/src;
                                     alt sphoto/alt;
                                     height sphoto/height;
                                     width sphoto/width;"/>
              </span>
              <span tal:condition="not:sphoto" tal:omit-tag="">
                <img tal:attributes="src here/empty_portfolio.gif/absolute_url;
                                     alt portfolio/title_or_id"/>
              </span>
            </span>
            <h3 tal:content="portfolio/Title">Portfolio title or id</h3>
            <div tal:content="portfolio/Description"></div>
          </a>
        </div>
      </div>
    </div>
    
    <div tal:define="batchInfos python:here.getPhotosInfos(here);
                     batch batchInfos/batch;
                     infos batchInfos/infos;
                     features batchInfos/features"
         tal:omit-tag="">
      <div metal:use-macro="here/photo_layout_macros/macros/grid">
        affichage grille
      </div>
    </div>
    <br clear="all"/>
    </div>
  </body>

</html>