[Logo] Infoglue - Official Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to determine if a component is displayed in a child page?  XML
Forum Index » Component Development
Author Message
jaric

Admin
[Avatar]

Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline

How do I determine in a component whether it currently is displayed

* in the page where it was added
or
* in a child page that inherits it since it has no component added in that slot?

I remember writing some code to do this, but I can not find it now and I was never sure I did it the right way, anyway.

Peter Jaric
Division for IT and Procurement
Uppsala University
[WWW]
bogeblad

Admin

Joined: 02/11/2009 11:10:04
Messages: 77
Offline

You should be able to use pc.infoGlueComponent.isInherited (not exact syntax). If it's true it's defined in another page higher in the structure.

Regards
Mattias Bogeblad

Regards
Mattias Bogeblad, Lead architect Infoglue
jaric

Admin
[Avatar]

Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline

Thanks!

I found my old code when knowing what to look for and I had implemented it like this:
Is this unnecessary complicated? Especially the part where I check Slot.isInherit()?

Peter Jaric
Division for IT and Procurement
Uppsala University
[WWW]
 
Forum Index » Component Development
Go to:   
Powered by JForum 2.1.8 © JForum Team