Jump to content

Dafina D


drilonb
 Share

Recommended Posts

This is for javascript to scroll content for pages those pictures all are pages not Images in one page, if i remove # link will break and work wrong,

here a example code:

<?php
    $children = $page->children("sort=-sort");
                    foreach($children as $portfolio) {
                    $image = $portfolio->images->first();
                    $thumb = $image->size(0, 450);    
                    echo"
<article id={$portfolio->name} class=slide data-category=portfolio data-og-title='{$portfolio->title}'>
<a href='#/{$portfolio->name}' class=slide-link>
<img src='{$thumb->url}' alt='{$portfolio->title}'/>
</a>
<div class='titullifoto'>{$portfolio->title}</div>
</article>";

U see " <article id={$portfolio->name} is same like <a href='#/{$portfolio->name}' just i add this to link #/ to work fine with java" java generate multiple articles and them need to define same like name where is the post and same for article id to show it in content ,

Link to comment
Share on other sites

  • 3 weeks later...

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...