CSS and Custom Template

Permalink
Hey, everyone.

After adding Remo's thumbnail custom template to page_list, I tried applying a custom style to each entry. Namely, it would be nice if the image was floating left.

So, in /blocks/page_list/templates, I created view.css and placed this in it:

.ccm-page-list-thumbnail {
  float: left;
  margin-right: 10px;
}


This did not appear to work, so I added a new div called ccm-page-list-item around the entire entry, modified the css, and still no effect.

I have been playing with this for a couple of hours and have yet to see the css change the list_entry at all. The custom template is active (i.e. the thumbnails are visible).

Further, I checked, and now there is a custom template called view - when selected, it merely shows the css - so, this doesn't seem correct. I even changed the name of view.css to thumbnail.css (same name of custom template) that that didn't seem to work.

The modified page_list code is attached.

Any ideas?

1 Attachment

Dantourin
 
Dantourin replied on at Permalink Best Answer Reply
Dantourin
Thanks to Chad's white paper (http://www.concrete5.org/community/forums/customizing_c5/custom-block-view-tutorial/), I was able to figure this out.

What I did:
o Named the file thumbnail.php and put it under /blocks/page_list/templates

What I should have done:
o Name the file view.php and put it under /blocks/page_list/templates/thumbnail

After that, I start hacking on the view.css until I made something work...finally, the following yielded the effect I was looking for:

#page .ccm-page-list-thumbnail {
  float: left;
  margin-right: 10px;
}