UDPages - how many layers?

Hi everyone,

i am just getting started with testing UD, and I have a problem that I do not understand:
Say I want to create a Admin Dashboard. I create a dynamic Page “/ad/users” - this is showing me all users in our AD with some basic info. One collumn is a link to all available data of this specific user: the link is “/ad/users/$username”. I created a dynamic page with the url “/ad/users/:username”. If I now open localhost:123/ad/users/john.doe, it does reload the page /ad/users, and not the userdata page.

I did a few trys and tests: it looks like I can only create two layers of pages: /ad/john.doe works, /ad/users/john.doe goes back to /ad/users… Is this correct? Can dynamic pages only be “nested” in two layers?



just create one page and make conditions on it
like new-udpage -url “/ad/users/:username”
if $username empty, just list all users.

But the problem is that if I load /ad/users/:username, it does open /ad/users - I cannot load a third layer.
And your solution is not possible here, because on the “all users” page I display 5 properties for each users, when I open the user specific page, I want to show all properties (about 100). Otherwise the filter would be enough.

One page! :slight_smile:
remove all the other pages, and make one

I have this:

1 Like

Okay, now i get it… This could work like I need it. I will implement it and check if it does what I want.

But Just for clarification: should it be possible to create a dynamic page /ad, a subpage /ad/users/, a subpage /ad/users/site1, … Is there any limitations on the count of netsted subpages?

Okay, I do not get the result I need: to stay in my example: I created a page with URL /ad/users/:username. How do I now access the “first” page, /ad/users? If I try it, I get a “Page not found”.

I would say this /ad/users/ ?

No, this brings “Page not Found”. I can work with a variable now, if the “username” is “allusers”, it shows the list, otherwise it loads the user info.
But it is still strange. The problem is not the three layers, the poblem seems in fact to be “sublayers”. If I create the pages /ad and /ad/users, I am not able to go open /ad/users/anyothersite. If I remove /ad/users, I can load /ad/users/anyotherside without problem…

UD is an awesome module, but not easy to handle…

well just handle this the correct way :slight_smile: dont do duplets in paths :slight_smile:
/ad/user/:Id # single user
/ad/users # All users
/ad/userdetail/:Id # something more specific than the /ad/user/:Id endpoint

or define one that is give all parameters a value:
so links could be /ad/user/all/default # show all users with default details
or /ad/user/john/email # show john and the Detail Type of “Email”