When you set a conditional rendering, the data for the condition and action is stored inside the Layout. Here is an example of a rendering with an "Alternative Datasource" rule that is applied if the current date is Wednesday:
<r xmlns:p="p" xmlns:s="s" p:p="1">
<d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}">
<r uid="{B343725A-3A93-446E-A9C8-3A2CBD3DB489}">
<rls>
<ruleset>
<rule uid="{EB08864D-C3BA-4130-A22B-ECF765D368E5}" s:name="Alternative Datasource">
<actions>
<action uid="D3AF4C7A8CF14BC59601B2E88CE2ECFC" s:id="{0F3C6BEC-E56B-4875-93D7-2846A75881D2}" s:DataSource="{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}" />
</actions>
<conditions>
<condition uid="86296CD54FE94F96B27C153C3318B5C7" s:id="{1F15625B-8BDC-4FD2-8F0C-6EE2B8EF0389}" s:day="{8A19F2AA-ABB9-4496-A64E-56CDBE1C2D4C}" />
</conditions>
</rule>
<rule uid="{00000000-0000-0000-0000-000000000000}" s:name="Default">
<conditions>
<condition uid="CE7C9CE0A8534636BCD0DCC373A8B661" s:id="{4888ABBB-F17D-4485-B14B-842413F88732}" />
</conditions>
<actions />
</rule>
</ruleset>
</rls>
</r>
</d>
</r>
Your intuition is right that this is connected to the "Set Data Source" action behind the scenes. The reference can be spotted here:
<action uid="D3AF4C7A8CF14BC59601B2E88CE2ECFC" s:id="{0F3C6BEC-E56B-4875-93D7-2846A75881D2}" s:DataSource="{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}" />
s:id
represents the ID of the Action Item ("Set Data Source")
s:DataSource
represents the value of the parameter DataSource
to be passed to the action.
Both of these parameters can be changed. For example to change the action so that it instead uses the "Set Placeholder" action and on execution sets the Placeholder value to "sidebar", you would use this:
<action uid="D3AF4C7A8CF14BC59601B2E88CE2ECFC" s:id="{9F2C4C80-8472-4296-9D41-D42A383B90DD}" s:Placeholder="sidebar" />
If this is saved and run on the published site, it absolutely works. However, there are two large drawbacks it seems, one of which you've spotted:
- No UI support. The rule will still show in the UI and conditions on it can be edited without affecting the altered action, but there is otherwise no indication there is a special rule in place.
- Previewing the rules in Editing mode do not appear to work. If you use the drop-down to view the alternate rule, it won't have any visible effect. This may just apply to the "Set Placeholder" action, however.
If UI support is not a problem for a solution then this could be useable.
Note that the tests for the above were performed in Sitecore 8.2 Initial Release.