Jump to content

List of porftolio items on homepage


Mijo
 Share

Recommended Posts

Hello everyone, I have a problem with displaying portfolio items on the homepage. I have a template (projects) and there I have list of portfolio item, everything works as expected, however when I try to display portfolio items on homepage there is a problem. My code looks like this: 

 <?php foreach ( $pages->find("template=projects") as $projects ):?> 
                        <div class="swiper-slide width-auto xs-height-auto last-paragraph-no-margin">
                            <div class="height-100 display-table">
                                <div class="display-table-cell vertical-align-middle">
                                    <div class="display-block position-relative">
                                        <img src="<?= $projects->imagesmall->url; ?>" alt=""/>
                                        <p class="bottom-text width-100 text-extra-small text-white text-uppercase text-center"><?= $projects->description; ?>  </p>
                                    </div>
                                    <div class="hover-title-box padding-55px-lr width-300px sm-width-100 sm-padding-20px-lr">
                                        <div class="separator width-50px bg-black md-display-none xs-margin-lr-auto"></div>
                                        <h3><a class="text-white font-weight-500 alt-font text-white-hover" href="#"><?= $projects->name; ?></a></h3>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        		
					  <? endforeach; ?>

Thank you. :-)

Link to comment
Share on other sites

8 minutes ago, titanium said:

Looks fine so far. What exactly does not work? Are there no projects in the output? Possibly the projects are hidden, in this case the selector looks like this:


$pages->find("template=projects,include=hidden")

 

Thanks :-) That solved the problem. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...