Is this one time deal for all blocks?Can I create a block of content, then I specify a few pages and page regions for this block to show up?Yes - we haven't published an easy to install package that does this (we really should), so here a the steps needed to create such a package. Step by step, how to build up such a feature in c1:This gives you a data layer - in your case a new sql table - and some simple ui for editing content. Your type will show up in the tree, add some test data. To create a rendering function, do the steps below. Here we do it using a C# Function:
- On the Data perspective, create a new Global Data type.
- On the Settings tab, name it "Shared content". Give it the programmatic name "Shared" and the namespace "Content" (names are up to you)
- On the Fields tab, create one field named "Title" and another field named "Content". Modify the last field in this way: make the length unlimited and (on the advanced tab) change the widget to Composite.Widgets.Text.VisualXhtmlEditor
- Save the data type
To use the function do this: while editing a page, click Insert, Function, select Content.Shared and then select a content block.
- On the Functions perspective create a new "Inline C# Function"
- Name it "RenderSharedContent", in the namespace "Content". Again - you own the naming. Press Finish.
- On the "Input Parameters" add new new parameter. Name it 'contentToShow' and make the parameter type "DataReference<Shared Content>"
- On the Source tab, paste in the code below.
- Save the function
Can I specify logic such as "shown on all pages" or "shown all selected pages" for this type of block?
Thanks!