Search code examples
drupaldrupal-7drupal-viewsdrupal-theming

Access custom theme settings from within views


I have a few custom theme settings which so on my themes settings page.. this all works fine and as expected.

I now need to create a view that gets that custom theme setting. I can't find anything on how to do this.

I have installed the views php module and I know this theme_get_setting('setting_name') is what i used to get the theme settings in my template.php file.

Any help with this will be much appreciated.

Regards C


Solution

  • Just for other people who come across this here is the answer:

    <?php print theme_get_setting('setting_name'); ?> works using the views_php module

    It doesn't show in the views preview but does in the actual page load.

    Thanks goes to @sheena_d for helping with this.