Marty Walker Posted October 15, 2013 Share Posted October 15, 2013 I'm really liking the ability to use font awesome icons in the page list and on a recent site I utilised the display of fields in the Page List. It got me thinking that the information itself, although useful, could be styled/displayed better. Would it be possible to allow the field title (and a small amount of custom styling) to be included in the Page List too? Sure, there's the potential to go overboard with something like this but if used with restraint it could be quite helpful. Example: Link to comment Share on other sites More sharing options...
MarcC Posted October 15, 2013 Share Posted October 15, 2013 Hey Marty, does this one help? http://modules.processwire.com/modules/markup-custom-page-list/ Seems you can use custom parameters to display e.g. field labels. Sorry if I misunderstood. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted October 15, 2013 Share Posted October 15, 2013 @Marty Walker with fontawesomePageLabel you can show an open or a close icon behind the title. (depending on the open or close state of the folder, or what ever icon you wish). The CSS fully customisable. FontawesomePageLabel has a JS approach, so you can use it in conjunction with all others know other PageLabelModules Link to comment Share on other sites More sharing options...
horst Posted October 15, 2013 Share Posted October 15, 2013 @Marty: I do this by using a module. It's a copy from somas PageListShowPageId. the PHP code is public function init() { $this->addHookAfter('ProcessPageListRender::getPageLabel', $this, 'addPageArchivnummerLabel'); } public function addPageArchivnummerLabel($event) { $page = $event->arguments('page'); if('album'==$page->template) { //$event->return = str_pad(count($page->images), 3, '0', STR_PAD_LEFT) . " " . $event->return; $event->return = $event->return . ' <span class="jhpPageListArchivnummer">' . $page->archivnummer . '</span> ' . ' <span class="jhpPageListImageCount">' . count($page->images) . '</span>'; } } and the CSS is .content .PageListItem > a span + span.jhpPageListImageCount:before { content: 'count: ' !important; } .content .PageListItem > a span + span.jhpPageListArchivnummer:before { content: '' !important; } .content .PageListItem > a span + span.jhpPageListImageCount, .content .PageListItem > a span + span.jhpPageListArchivnummer { font-size:0.9em; background-color:#EEE; color: #777; padding: 2px 5px 1px 5px; border: medium none !important; border-radius: 3px 3px 3px 3px; } 6 Link to comment Share on other sites More sharing options...
Can Posted July 12, 2014 Share Posted July 12, 2014 Wished I could just count.images or images.count or something but you made my day Horst! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now