Jump to content

Seletor in page reference


Recommended Posts

Hi Guys,

i've got a page reference field "mh_lstg" with a specific selector in it:
This will give me no results. If i set the "=mh_bautraeger.id"-part to "=1070", i'll get the result as expected.

The "mh_bautraeger" is also a page reference. This field is located in both templates (lstg_mainTmpl|mh_mainTmpl ).
I will achieve, that i only get the data from lstg_mainTmpl, if i select in the mh_mainTmpl the mh_bautraeger-ID, that belongs to
the record from "lstg_mainTmpl".

Can anybody give me a tip ( assumed you know what i mean ;-) )?

Many Thanks!!!

Link to comment
Share on other sites

Of course the selector 'mh_bautraeger.id=mh_bautraeger.id' will give you no result since the value page id cannot be a string. It is always an integer.

If I get you right you want to create a page select field providing all pages using template lstg_mainTmpl having a mh_bautraeger selected which is also selected in any (or only one?) other page using mh_mainTmpl.
This is not possible via selector but you can do this via custom php code. You find a quick instruction under Input tab in your field setting. The hook should be placed in your /site/ready.php

It could be helpful if you describe what the final target of your setting is. Maybe there exist a completely different approach.


  • Like 1
Link to comment
Share on other sites

Thanx so far!

i´ve got a parent page as as carrier of several descriptions. then i have a parent page as as carrier several bautraeger.
Now every single bautraeger can only have a certian number ( maby 1 or 2 ) of descriptions.
What i now want to achieve is, that the page reference field "mh_lstg" only shows the right match of descriptions for every specific bautraeger.

 - Bauträger1 ( "mh_lstg" is only showing descrip.1 +3 )
 - Bauträger2  ( "mh_lstg" is only showing descrip.2 )

- descrip.1 ( Bauträger1 )
- descrip.2 ( ( Bauträger2 )
- descrip.3 ( Bauträger1 )

Do yout get the point?


Link to comment
Share on other sites

  • 3 weeks later...

I´ve corrected my structure as follows:

- bauträger1
      - leistungspaket1
      - musterhäuser1

- bauträger2
      - leistungspaket2
      - musterhäuser1

Thanks, ottogal for this link. But nevertheless have still no idea, how i can bring out the "leistungspakete" from associated "bauträger".
That means, the page->reference field in the template "musterhäuser" should only show the "leistungspakete" (children)
from, in this case, "bauträger1" a.s.o.

Do you know, what i mean?

Thanks and happy easter!!

Link to comment
Share on other sites

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

  • Create New...