Delete
Setting
Add New Item
Menu List
Title | Content Type | Order | Action | ||||||
---|---|---|---|---|---|---|---|---|---|
{{kb_content.name}} {{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
{{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
No record |
Step 4: Passing Data Controller to Views and display those in the view
This is complete tutorial to build an application using grails 3.x. There are several parts of tutorial where every part has a specific objective and several steps. So it is a step by step tutorial to build a complete application using grails 3.x.
You can pass data controller to views in different way. Suppose you have an array or object as like
def page_title = 'Home page'
def page_description = 'Welcome to "Complete Application using grails 3.x" Part 1'
render(view: "index", model: [page_title: page_title, page_description: page_description])
This data should be an array with key / value pairs. Inside your view, you can then access each value using its corresponding key, such as ${key}. In this index page, we can see this data as following :
<div class="jumbotron"> <h1> ${page_title}</h1> <p>${page_description}</p> </div>
Same way, you can pass object and other data which you want to.