I'm working with print and I would to create a tpl for a specific view (for a "page" display). Is it possible, using the naming convenction?


I think you can only style the view for print adding in your theme a print css hiding some field with css.

stylesheets[print][] = css/print.css
  • You could of course also add the css in a preprocess hook. – hampusn Sep 18 '12 at 15:58

In the views ui, click the 'advanced' link to view options. Click on 'Theme : information', here you will get some tpl suggestions. The suggestions you get are for different levels of theming your view from top level down to theming just a particular field.

Display output: top level
Field Content: [FIELD_NAME]: field level

Create your tpl file in your theme directory and flush caches.

  • I know this and I've already searched there. The problem is that I would a specific tpl for print. – arrubiu Sep 18 '12 at 14:18
  • @sergiod: When do you want your print template to be seen/used? – hampusn Sep 18 '12 at 16:02
  • I've a view on path my-content/%nid. I want that if I call print/my-content/%nid enter a custom print tpl. – arrubiu Sep 18 '12 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.