Active
Project:
Views custom template
Version:
7.x-2.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
5 Jul 2014 at 22:18 UTC
Updated:
7 Jul 2014 at 17:46 UTC
Jump to comment: Most recent
Hi there,
What is the preprocess function to use for a 'mycustomtemplate' custom template? (using 7.x-2.0)
I have tried the following without success:
Thanks!
Comments
Comment #1
rudiedirkx commentedEric should probably answer this, since he made 2.0. My answer:
Since views_custom_template doesn't register a theme function, it doesn't expose a preprocessor hook. The preprocess function it uses (
template_preprocess_views_custom_template) works because of a theme registry alter, which checks for allviews_view*theme functions. So maybe you should use the normal views preprocessor hooks... What are you trying to achieve? Alter the$vars? Then, yes, use the normal Views preprocessor.Eric?
Comment #2
rgx commentedThanks!
Yes, alter the
$vars.mytheme_preprocess_views_view_unformattedworks,but I'm looking for something especific to the 'mycustomtemplate'.
Comment #3
rudiedirkx commentedThere's no specific hook, but you should have all the info in $vars, so you can check there.
If that's not good enough, I could make a fake preprocessor in my custom preprocessor... Same exact result though.