Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Path Expressions: Thought I Knew What I was Doing View modes: 
User avatar
Member
Member
PeterPC - 4/4/2012 3:48:14 PM
   
Path Expressions: Thought I Knew What I was Doing
Hi,

I have

Root
-Street
--House
---Room
----pic1
----pic2
----pic3
---Deck
----pic1
----pic2
----pic3
---Yard
----pic1
----pic2
----pic3

The Web Part is on "Street". I'm trying to target all "pics" under "Room" only, which I thought would be

/{0}/{1}/{2}/Room/%

I dont want pics from under Deck and Yard - So /{0}/{1}/{2}/% will not help.

Can I mix path names and expressions?

Thanks




User avatar
Kentico Support
Kentico Support
kentico_janh - 4/5/2012 1:24:04 AM
   
RE:Path Expressions: Thought I Knew What I was Doing
Hello,

Sure, you can mix them, but why you use expressions, when you want to display images only from Room section? You can just specify the Path as /Root/Street/House/Room/%.

Best regards,
Jan Hermann

User avatar
Member
Member
PeterPC - 4/5/2012 8:15:58 AM
   
RE:Path Expressions: Thought I Knew What I was Doing
Thank you - I should have been more clear:

This structure is repeated several times elsewhere in the tree, so if I use an explicit path I'll need to make individual templates for each section. I'm trying to use one global template that always finds the Room folder, in that part of the tree. It ends up that I have to use individual templates for other reasons, so it doesn't matter anyway! Thanks again.

User avatar
Kentico Support
Kentico Support
kentico_janh - 4/6/2012 3:14:13 AM
   
RE:Path Expressions: Thought I Knew What I was Doing
Hello,

Ok, but I'm going to answer you anyway :)

This can't be done only by path expression, because there is one more level between current Street document and required Room one (in your example this document is House). If the path would be the same and always with the House level, then the Path property could be /{0}/{1}/House/Room/% and this would work. But the Path property can contain custom macro, which would find the right path to your images, so it can be done by custom macros.

Best regards,
Jan Hermann