Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add this in section for private strings
- private string _customNodeName = "";
- // add this in public properties
- // remember to add CustomNodeName as textstring property to your macro!
- public string CustomNodeName
- {
- set { _customNodeName = value; }
- }
- // change this in btnSubmit_Click private function
- if (!_editMode)
- {
- umbraco.cms.businesslogic.CMSNode parent = new umbraco.cms.businesslogic.CMSNode(_nodeId);
- string text = Title.Text;
- if (!_showTitle && text.Length == 0)
- {
- // if we set custom name, use that..
- if (_customNodeName.Length > 0)
- {
- text = _customNodeName;
- }
- else
- {
- try
- {
- text = "RE: " + parent.Text;
- }
- catch
- {
- text = "Created by Doc2Form on " + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement