Create Standard page from XML Datasource Record Set

Hello,


I have an XML feed of staff information and have it in Matrix as an XML Data Source and I can see all the shadow assets under it as Data Source Record Set and each one is name with a staff members name and i can print them using a Asset Listing Page which is great.



But I'm trying to create a standard page from the each Data Source Record Set using a trigger and call the standard page the same name as the Data Source Record Set, so each standard page is given a staff members name. - the idea is then to print there details to this page and also have an area each individual can edit.



Problem is I can get the trigger to create a standard page - any guidance on this ?



So far I have



Event

Asset Attributes Changed



Conditions

Has a Child / Parent with has a Parent asset with ID set to the XML Data Source asset



Actions

Create Asset which is set to standard page and to create in a folder called User Pages



Thanks


The XML Bridge does not fire any events, so the trigger will never fire. There is no way for Matrix to know when the values exposed by the bridge change (as we don't do any comparison to previous versions). You would probably have to make the page creation process slightly more manual by requiring users to click a link or push a button once they are logged in and then using the currently logged in username as the source for the standard page name.

So my way of pulling in XML from our staff database is no different from using the LDAP bridge - both don't allow searching and both don't allow me to create page assets from them.

Correct. Bridges are designed to allow access to external data without creating assets within Matrix. If you want to create pages from XML, you should look at the import_from_xml.php script in the scripts/import directory.