Creating New Content within ContentItem?

Topics: Writing modules
Mar 4, 2011 at 3:54 PM
Edited Mar 4, 2011 at 3:56 PM

I am upgrading my Addresses Module to allow multiple addresses to a ContentItem.  I have the ContentPart Addresses viewable and would like to Add a link or button that would insert the new Address associated with the ContentItem via jquery(AJAX).  I don't want to post the form for the ContentItem.  Is there a sample that I can view that has this type of Submission?

Mar 4, 2011 at 6:58 PM

Nevermind on the above, I was approaching this all wrong.

My question is, Looking at Orchard.Tags, since this is similar to what I am needing.  Where or who is loading CreateTag.cshtml? Also, what are these attribute values used for like in the CreateTag.cshtml?

<button class="primaryAction" type="submit" name="submit.Create" value="yes">@T("Add Tag")</button> 
I don't see anything in the css or Scripts that would utilize the attribute values!

Coordinator
Mar 15, 2011 at 12:35 AM

ShapeTemplateBindingStrategy is responsible for discovering how to map shapes to templates.

Attributes:
- class is used in the CSS to style the button (in SafeMode and TheAdmin)
- type tells the browser that the button submits the form
- name will be used by the browser to specify the parameter name in the submitted form
- value will be the value of the form field if the button is clicked