1. Customize the Comment list
Add a new Comment list page, execute the command line
> play crud:ov --template Comments/list
will generate /app/views/Comments/list.html
In the generated file #{crud.table /} is the content of the table, which can be replaced with the following content to display more columns
#{crud.table fields:['content', 'post', 'author'] / }
If you want to process the content of a certain column
#{crud.table fields:['content', 'post', 'author']}
#{crud.custom 'content'}
< ;a href="@{Comments.show(object.id)}">
${object.content.length() > 50 ? object.content[0..50] + '…' : object. content}
#{/crud.custom}
#{/crud.table}
2. Customize Post form
>play crud:ov --template Posts/show
" < : .tags-list .selected {
.getElementById('h'+ tagEl.id); {
tagEl.className = 'tag selected';s.Tag.findAll() , as:'tag'}
'}">
="${ object.tags.contains(tag) ? tag.id : ''}" />
#{/list}
The above is the content of PlayFramework to completely implement an APP (10). For more related content, please pay attention to the PHP Chinese website (www.php.cn)!