[Markdown] 

Wiki: Item widget

Modifying the item widget

Need to find a way to have different style for page in widget and normal page.

view/tpl/page_display.tpl:

<div class="page">
        <div class="widget" id="page-content-wrapper">
                {{if $title}}
                <div class="section-title-wrapper">
                        <h2 class="page-title">{{$title}}</h2>
                </div>
                {{/if}}
                <div class="section-content-wrapper-item">
                        <div class="page-author"><a class="page-author-link" href="%7B%7B$auth_url%7D%7D">{{$author}}</a></div>
                        <div class="page-date">{{$date}}</div>
                        <div class="page-body-item">{{$body}}</div>
                </div>
        </div>
</div>

I have made the following changes

  • class="widget" to make it look like the other widgets
  • class="section-content-wrapper-item" to avoid extra padding
  • class="page-body-item" to set a smaller text size in CSS to match other widgets

I'm not sure if it is the right approach but it works for me. Not working, normal pages get the same changes!