Macro with Content Parameter
I have created a custom macro with a content parameter. uSync does not appear to try to translate the content ID when syncing the data to another database. Is this a bug or is this not supported?
Hi - yeah lets call it a feature :)
uSync doesn't do mapping of the content ids within the macro parameters (at the moment) :(
this in theory is fixable, it just needs someone who is much clever than me at reg ex to solve.
a typical entry might look like:
<p>Some <a data-id="1062" href="/{localLink:1062}" title="Somethings">Content </a>here</p>
<p> </p>
<?UMBRACO_MACRO macroAlias="ImageMacroThingy" Image="1058,1059" Contents="1062" />
the mapping config for rich text exitors uses the following regex (its in usyncCore.config)
((?<=localLink:)([0-9]+)|(?<=data-id=")([0-9]+))
this will match the link (and any images) embedded in the rte but not the macro, so it needs to include some reg ext to find the MACRO markup and extract the numbers (or string of numbers) from any parameters that might be in there.
sadly i don't think thats within my regex skillz