Is there a way in Composite C1 to manage static text in ASP.NET usercontrols used on pages through the backend?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this answer I’m asuming you would like the “static text” to be maintained via a Visual Editor (html document), allowing your users to do heading, styling, bold etc. If you are just going for a simple large textbox this can be simplified.
Start by creating a new Global Data Type on the Data perspective – name it (in the code sample below, I named it Maw.Content) and give it these two fields:
Once you save your new data type you can add ‘records’ to it – and specify a field key and related content.
This should take care of managing the content – the UI you get should be pretty user friendly. You can right click the data type in the tree and use the command “Show in Content perspective” which will make your data type show up on Content | Website Items. This way your users do not have to use the Data perspective at all.
Consider limiting user access to the data folder to just “Edit”, in case you do not need users to add/delete items. Right click the folder containing data items and slect ‘Edit Permissions’.
Outputting the XHTML from a named field
In your user controls you can grab the html related to s specific FieldKey like this: