Design dialogs are a very useful feature of cq5. It allows you to store configurations that can be accessed across pages. To be more specific the data is stored at a common place for each template. Changes through a design dialog will get reflected across all pages created using the same template.
A design can be used to store CSS and lot of other stuff .To create a design go to miscadmin from site admin(click on the gear icon in the top tool bar). Under the design folder create a new page out of the design template (like u create a normal page). That is all it takes to create a design. To assign your site a design on the page follow these steps.
To create a component with design dialog follow these steps
To fetch the stored data use currentStyle.get("<name of the text field>",String.class). ${currentStyle.nameOfTextField} in JSTL (global.jsp) must be included on your component to use the implicit currentStyle object.
A design can be used to store CSS and lot of other stuff .To create a design go to miscadmin from site admin(click on the gear icon in the top tool bar). Under the design folder create a new page out of the design template (like u create a normal page). That is all it takes to create a design. To assign your site a design on the page follow these steps.
- Open the page from site admin
- click on the page properties link in the side kick to launch page properties dialog
- click on the advanced tab
- select the design you created form the dropdown
To create a component with design dialog follow these steps
- Head to components folder of your project under /apps.
- Right click and select create component from the create menu.
- Enter label ,title , component group and click on next till you get ok option and hit ok.
- Right click on the component and select create dialog option from the create menu.
- Enter the label as design_dialog(this cannot be different) and title of your choice and hit ok.
- Go to tab1 node under the design dialog node and select create node from the create menu
- create a textfield under the design dialog(follow creating a component with dialog post if you don't no how)
- Now drag and drop your component into your page (check out previous posts if you don't know how).
- Now on your page's side kick select design mode (ruler icon on the sidekicks bottom tool bar).
- you will see a edit bar that says design of <your components name>
- type some text and click ok
To fetch the stored data use currentStyle.get("<name of the text field>",String.class). ${currentStyle.nameOfTextField} in JSTL (global.jsp) must be included on your component to use the implicit currentStyle object.
0 comments:
Post a Comment