Jump to content

pages find - dynamic none, static all


bwakad
 Share

Recommended Posts

Just trying something for the prev next functions but I really do not understand, this first one not giving anything contrary to second one.

While $page->parent is really a /path/. I have tried without ->name, without qoutes, placed $variable as concatenated outside of qoutes... Nothing seem to do it. Must be loosing my mind. lol

<?php $navigation = $pages->find("parent=/{$page->parent->name}/");?>
<?php $navigation = $pages->find("parent=/browse/");?>

Basically I want the current page parent children as array (siblings). Only on rootparent = home I could not do that (because no parent)...

Link to comment
Share on other sites

I have tried both from Soma and Diogo - not working.

In this case, they both should reflect "/browse/". Using static works, dynamic not. Strange.

I just used $page->parent->children - not working either...

But since I do not want to restrict myself only to /browse/ I thought to use page parent.

So this static path is working.

<?php $navigation = $pages->find("parent=/browse/");?>
$page->prev($navigation)->url

- EDIT - stupid!!!

I forgot, in my old code - I used echo strings : echo "<div><a href='$page->prev($navigation)->url'>Link here</a></div>";

This time I used <a href="<php $page->prev($navigation)->url;?>" (without echo)...

Sorry all, thought suddenly something was wrong with my PW.

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