Jump to content

Recommended Posts

Posted
Hi everyone,
i am a little confused 
is it possible for a widget  to show the id of the page that render it? so the widget can have a selector that filters results by the id of that particular page?
thanks.
 
Posted

What exactly do you mean with Widget? I've never used a thing called widget.... But if you render a page with $page->render(); why not echo $page->id?

Posted
thanks guys.

diogo, How did I miss this?

all morning i'm searching the forum for a post like this 

thanks again 
Posted

I ended up with this

$categoryUrl = $_SERVER["REQUEST_URI"];
$categoryToRender = explode("/", $categoryUrl);
$category= $pages->find("categories.name=$categoryToRender[2]");

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
  • Recently Browsing   0 members

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