ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Getting Portfolio page to link through to single item?

February 27, 2011 6:04pm

Subscribe [1]
  • #1 / Feb 27, 2011 6:04pm

    slimboyfatz35

    31 posts

    Hi all,

    A really straightforward thing I’m sure, but its got me stumped at the mo?? :(

    Currently using the Matrix module to display my portfolio gallery (the usual, list of thumbnails, click through to specific page with full size image), unsure of what code to pop into the href src? I was hoping to have both the portfolio page, and single entry page code in the same template then use segments, but not 100% sure of the exact code I would need?

    My current portfolio/index.php code is as follows :

    {if segment_1 == 'portfolio'}        
       
        {exp:channel:entries channel="portfolio"}
        
        <h1>{title}</h1>
        
        {portfolio_introduction}
        
        {/exp:channel:entries}
        
        {exp:channel:entries channel="portfolio"}
          
          <ul id="portfolio-thumbnails">
            {gallery}
              <li><a href="http://{path={segment_1}/segment_2}">_            {exp:ce_img:pair src="{image}" max="260" crop="yes|center,center|130,-250|no"}_            {made}_            {/exp:ce_img:pair}_          <span>{image_title}</span></a></li>
            {/gallery}
          </ul>
          
        {/exp:channel:entries}
        
        {/if}

    I am also using the Structure module, will this affect the way I would code up this template file?

    thanks in advance

    Marc

  • #2 / Feb 28, 2011 5:16am

    slimboyfatz35

    31 posts

    Anyone? 😊

  • #3 / Feb 28, 2011 4:08pm

    Ingmar

    29245 posts

    I don’t understand your problem. If you are using a standard exp:channel that can server as both your index page (showing a number of entries) as well as the single entry template (with an additional url_title in the URL). This should happen pretty much automatically.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases