Trigger action on last child

I wanna set a trigger that would perform an action on last child Standard Pages of selected Tree location.
Is that possible? Maybe it could be done by inverse existing conditions?

[quote]
I wanna set a trigger that would perform an action on last child Standard Pages of selected Tree location.

Is that possible? Maybe it could be done by inverse existing conditions?

[/quote]



Are you needing in always on the last child of ANY tree, or just one specific child? If so, just set your condition to be that asset id, which would be that last child asset.

[quote]
Are you needing in always on the last child of ANY tree, or just one specific child? If so, just set your condition to be that asset id, which would be that last child asset.

[/quote]

    Asset #0 (Standard Page) - selected root for trigger
    |_Asset #1 (Standard Page)
     |_Asset #2 (Standard Page)
      |_Asset #3 (Standard Page)
     |_Asset #4 (Standard Page)
      |_Asset #5 (Standard Page)
       |_Asset #6 (Standard Page)
    |_Asset #7 (Standard Page)
    |_Asset #8 (Standard Page)
     |_Asset #9 (Standard Page)
    |_Asset #10 (Standard Page)


So the trigger should perform action on assets #: 3, 6, 7, 9, 10.

I believe that setting asset id is not an answer in this case.

Is there a way to set a trigger that set a NULL Paint Layout for an asset?
(I don't know how to set this, I cannot set empty Paint Layout in trigger action).

[quote]

    Asset #0 (Standard Page) - selected root for trigger
    |_Asset #1 (Standard Page)
     |_Asset #2 (Standard Page)
      |_Asset #3 (Standard Page)
     |_Asset #4 (Standard Page)
      |_Asset #5 (Standard Page)
       |_Asset #6 (Standard Page)
    |_Asset #7 (Standard Page)
    |_Asset #8 (Standard Page)
     |_Asset #9 (Standard Page)
    |_Asset #10 (Standard Page)


So the trigger should perform action on assets #: 3, 6, 7, 9, 10.

I believe that setting asset id is not an answer in this case.

Is there a way to set a trigger that set a NULL Paint Layout for an asset?
(I don't know how to set this, I cannot set empty Paint Layout in trigger action).
[/quote]

Ok, here is another idea. Use jQuery to find the last child like you are wanting, and have it append something on the URL, such as ?action=last-child-selector or something. Then, in your trigger setup, use the URL Match condition.

It seems like that should work, and would be what I would do if I needed to do that same.

Just an idea.

[quote]
Ok, here is another idea. Use jQuery to find the last child like you are wanting, and have it append something on the URL, such as ?action=last-child-selector or something. Then, in your trigger setup, use the URL Match condition.



It seems like that should work, and would be what I would do if I needed to do that same.



Just an idea.

[/quote]



Your idea is very good, but my jQuery skills are not :\



Do You know how to set empty (NULL) Paint Layout via Trigger?

[quote]
Your idea is very good, but my jQuery skills are not :\



Do You know how to set empty (NULL) Paint Layout via Trigger?

[/quote]



Can you tell us first what you are trying to accomplish? We might have a better solution for what you are trying to do.

I have about 50 Standard Page assets that describes services of my department (just tables with content such: name of service, contact, who can use this service, full description…).


Those pages are children of other Standard Pages - Categories.

In many cases Categories have also subcategories (also Standard Pages), but services are always last children in tree.



Usual I use Standard Pages with Paint Layouts that show content and list pages in tree below & have some other conditions - and for Categories Paint Layout works well.



Coordinator of my work want that when someone see Standard Page that describe service - he see a list of other services in the same category.



So I prepared a Paint Layout that use two Asset Listings (one goes 1 level up and other 1 level down) and it works. But I wanna prepare a trigger that sets this Paint Layout to all services Standard Pages at one time :slight_smile:

[quote]
I have about 50 Standard Page assets that describes services of my department (just tables with content such: name of service, contact, who can use this service, full description…).



Those pages are children of other Standard Pages - Categories.

In many cases Categories have also subcategories (also Standard Pages), but services are always last children in tree.



Usual I use Standard Pages with Paint Layouts that show content and list pages in tree below & have some other conditions - and for Categories Paint Layout works well.



Coordinator of my work want that when someone see Standard Page that describe service - he see a list of other services in the same category.



So I prepared a Paint Layout that use two Asset Listings (one goes 1 level up and other 1 level down) and it works. But I wanna prepare a trigger that sets this Paint Layout to all services Standard Pages at one time :slight_smile:

[/quote]



So, this is just something you want to do one time with Trigger Batching? Not at run time when a user is browsing, correct?

[quote]
So, this is just something you want to do one time with Trigger Batching? Not at run time when a user is browsing, correct?

[/quote]

Correct.

[quote]
Correct.

[/quote]



Hmm, not sure how to do this.



Lets do it old school and bring Avi Miller back to solve this. Avi, where are you?!

Avi's back here? If so it's great news