Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > can i use a macro in a custom form layout? View modes: 
User avatar
Member
Member
mark_b_mandel-yahoo.co - 1/18/2012 5:13:46 PM
   
can i use a macro in a custom form layout?
Hi, I'm writing a custom tool to streamline the process of populating related documents.

I want to insert a link under the 'form' tab to open a pop-up window in the 'form' tab of the document type.

I'm thinking that i should be able to use the 'custom form layout' to insert the link and pass across the 'documentid' as a url parameter.

But i'm having trouble getting the documentid to display in the 'custom form layout' - can i use a macro in 'custom form layout' ? or some other method?

thanks for your help
Mark

User avatar
Member
Member
kentico_michal - 1/29/2012 4:21:48 AM
   
RE:can i use a macro in a custom form layout?
Hello,

Regrettably, only localization macros are resolved in the custom form definition. To add a custom link you will need to customize the page that generates the Form tab which is located here: ~\CMSModules\Content\CMSDesk\Edit\Edit.aspx.cs and add a new link manually. Moreover, the current NodeID is stored in the Url parameter and it can be accessed using this code:

int nodeId = QueryHelper.GetInteger("nodeid", 0);

Best regards,
Michal Legen