Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# rabol 11/14/2005 7:46 AM
Hi

While investigating how to implement support for custom CSS, I have discovered that the PageEngine is instantiated twice for each new page that is displayed - but only the first time a page is displayed.

eg. the first time the "home" page is display PageEngine is instantiated twice, if you the do a refresh it's only instantiated one time – Maybe some caching?

It's designed to do so, then I think it could be possible to add custom CSS quite easy :)
"Just" add an global array, and let each module add the CSS, and then output the array in second run.

Until now I have not been able to figure out why the PageEngine is instantiated twice... But give me a few hours more ;)

Best
Steen
# martijnb 11/14/2005 8:35 AM
If you see the PageEngine being instantiated multiple times, it will probably be right after starting the app. This is caused by modules that register their NHibernate configuration in the Cuyahoga SessionFactory. After registering, a redirect to the same page is required because the old NHibernate session isn't valid anymore when the configuration changes.

When developing I often experience 5 reloads because I tend to put all modules on one page :).