Jump to content

andy.aristiyanto

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by andy.aristiyanto

  1. Hi Wanze, Thanks for the reply. What I'm trying to do is whenever I read the post with Title A, the widget of Recent Posts will list all the 5 most recent posts excluding the Title A. In widget recent posts: $posts = $pages->find("template=post, sort=-date, start=0, limit=$limit"); $parent = null; $out = ''; foreach($posts as $item) { if($input->urlSegment1 == $item->title) { continue; } $out .= "<li><a href='{$item->url}'>{$item->title}</a></li>"; $parent = $item->parent; } But the $input->urlSegment1 result nothing. I'm thinking of using global variable, put the current read blog title there so I can read it in the widget. But I dont think it's the most efficient way. Cheers.
  2. Dear all, Newbie here I've successfully installed the Blog Profile, and trying to modify the recent post widget. I use the $input->urlSegment1 to get the path of URL. But somehow it return nothing. I've checked the site/config.php and enable the Setup->Templates->URLs->Allow URL Segments? but still the the syntax return nothing. Is there something I missed here? Thanks.
×
×
  • Create New...