jeffreypriebe
jeffreypriebe

Reputation: 2287

When in a page life cycle does Umbraco run XSLT macros?

Specifically, I have an XSLT macro that modifies some content. I have this in my Template above a call to a .net Macro.

My .net macro uses the Page_Load event and it can't see what changes in the XSLT macro. (If I refresh, then the XSLT work has been completed and the .net macro sees what I expect it to. But the first run through always fails.)

I think that this is related to timing of the page life cycle and the XSLT macro isn't performing it's work until after the Page_Load event of my .net macro.

Upvotes: 2

Views: 314

Answers (1)

jeffreypriebe
jeffreypriebe

Reputation: 2287

With further testing, I can confirm that umbraco runs the XSLT macros after all .net macro Page_Load events - regardless of their order in a template.

So don't do something in XSLT and then expect it to be done in .net "later" in the template. It won't be there.

I'd love to provide a reference form the Umbraco source, but don't have it at the moment.

Upvotes: 1

Related Questions