Search the Community
Showing results for tags 'find page'.
-
Hi I want to list the latest articles on the site, the articles have multiple templates using the same template php archive. I have tried with: $pages->find('template=lvl04-post, limit=5'); but didn't work. Also, I have read about $template->filename, but don't understando how to use it with find() Articles and parent categories have their own single templates because of role permissions, so I can't just do a normal 'template=name' This is the full code: <?php $posts = $pages->find('template=phpfilename?, limit=5'); foreach($posts as $post){ ?> <a href="<?php echo $post->url; ?>"><?php echo $post->title; ?></a><br /> <?php echo date("d/m/Y", $post->published); ?><br/> <?php echo $post->resume; ?><br/> <?php } ?> Any help is appreciated ?
-
Hi there, Simple question needs simple answer… I'm still a newby and trying to get my head round pw. I'm trying to access (and eventually get the path) to a particular page somewhere else in the tree, without knowing the complete path, only knowing the name of the page. I'm getting the name of the page with urlSegment. Code looks like this so far: $myPage=$input->urlSegment1; $pathToPage=$pages->find($myPage)->path; Played around with it, browsed the forum and failed embarassingly. Any suggestions? Thanks.