Developer forum

Forum » Templates » Display all user groups - also when a certain groups is clicked

Display all user groups - also when a certain groups is clicked

Rune Skovbo
Reply

Hi people

 

I need to create a navigation with all user groups under a specific folder. I get the groups displayed just fine, using the standard templates, but the problem is, that when i enter a group (to view its users) i loose the option to display all my other usergroups because this is handled by the URL.

 

Any way to access a usergroup and still show that usergroup and its siplings in a loop?

 

So I guess what i need is a "scopeless" <!--@LoopStart(AllGroups)--><!--@LoopEnd(AllGroups)-->

 

/Rune


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Rune

Not directly.

But on the page you have the tree, instead of loading a new page with querystring parameter, load the users for that page using JSON. That will require you to have 2 pages, one hidden and with a JSON output with the users of a group.

Nicolai

 
Rune Skovbo
Reply

Hi Nicolai

 

Will that work differently than using <!--Global:Paragraph.Content(paragraphID)--> from another page? I tried that and still got the same result as if the paragraphs (and modules) were on the same page.

 

/Rune

 
Rune Skovbo
Reply

... Or can it be done by some clever razor loop?

 

/Rune

 
Nicolai Høeg Pedersen
Reply

You cannot use global paragraph. Because it will still be rendered in the same pageview context and react on the same querystring parameters.

 
Rune Skovbo
Reply

Yeah, found out :-)

Ok, so I guess I'll have to figure out some JSON if razor can't do the trick.

 

Thanks

/Rune

 

You must be logged in to post in the forum