A number of packages already provide displayed_object_id
as a property to the master template. I don't know if this is already accepted as a Good Thing (tm) - but it should be. It allows generic services (eg. categorisation, rating, comments, etc) to be added to a page in the master template. I would propose that instead of using a master template property we use [ad_conn object_id] instead.
<h3>What is being proposed?</h3>
Introduce best practice that a page handling a request should set [ad_conn object_id] to the principal object being displayed in the page. Assuming one can be easily identified (eg. forum-view would set it to the forum_id, the users private homepage would set it to the user_id, etc, etc). If one cannot be easily identified then [ad_conn object_id] should return empty string.
<h3>Why it's good</h3>
It allows master templates and includes to find data relating to the main object of a page without needing to be explicitly supported by the application.
As a secondary benefit you could store permissions and other generic data along side it to prevent several lookups in the same request - eg. [ad_conn object.admin_p] or something. But maybe that's a separate TIP.
<h3>Why it's bad</h3>
There might be some disagreement about which object is the main one on some pages? Hard to turn off generic services for some object? But these problems exist for displayed_object_id in it's current form.