Use own created WebPartField-Values as macros directly in a container

Login to vote

It's easy to create custom modules with dynamic HTML without opening the webpart in VisualStudio. All is done with Containers and macros.

Example of a ToolTip Widget

We will created a widget which shows a tooltip on a absolute position on the page.
The position (CSS Values) you will define in widget window,

1. Clone the Editable HTML WebPart. and go to properties tab


2. Add your own Fields to the properties for example: PosTop, PosBottom....

3. Create a new Container and Use your created fields as macros to get the values which you'll enter while adding the webpart. You can also dynamcaly add the ContainerTitle in it with:

for example: <h2>{%ContainerTitle%}</h2>

{%PosTop%} - {%PosBottom%} ....

3. Add the webpart or the created a widget and add your values which will be placed in your container

4. Select the container you have created. (I set it as default value in the webpart propertie)


5. Define the ContainerTitle (if you have enabled the field)

6. Enjoy!

In this example you can add a tooltip everywere on the page, dynamicaly with a widget. It's going to be absolute positioned with the given values.

Don't forget to set the class in CSS File and give a position absolute attribute

.infomsg {


background: blue;










Posted by marc illien on 7/28/2011 6:57:55 AM
Blog post currently doesn't have any comments.