Skip to main content

I'm trying to get a variable from a view to display on a block. For example "We have 200 blog posts" (200 being the variable). Right now I'm using the views_embed_view method (https://api.drupal.org/api/views/views.module/function/views_embed_view/7)

the method. The problem is the view includes a bunch of mark up I don't need/want (the container, theme, etc)

Is it possible to just call the field I want? I know I could create a whole custom theme for the view without markup but I'm hoping there is an easier way.

I'm trying to get a variable from a view to display on a block. For example "We have 200 blog posts" (200 being the variable). Right now I'm using the views_embed_view method (https://api.drupal.org/api/views/views.module/function/views_embed_view/7)

the problem is the view includes a bunch of mark up I don't need/want (the container, theme, etc)

Is it possible to just call the field I want? I know I could create a whole custom theme for the view without markup but I'm hoping there is an easier way.

I'm trying to get a variable from a view to display on a block. For example "We have 200 blog posts" (200 being the variable). Right now I'm using the views_embed_view method. The problem is the view includes a bunch of mark up I don't need/want (the container, theme, etc)

Is it possible to just call the field I want? I know I could create a whole custom theme for the view without markup but I'm hoping there is an easier way.

corrected title addtional
Link
Sam
  • 549
  • 1
  • 10
  • 27

Print just one viewfield data from a view into a block?

Source Link
Sam
  • 549
  • 1
  • 10
  • 27

Print just one view from a view?

I'm trying to get a variable from a view to display on a block. For example "We have 200 blog posts" (200 being the variable). Right now I'm using the views_embed_view method (https://api.drupal.org/api/views/views.module/function/views_embed_view/7)

the problem is the view includes a bunch of mark up I don't need/want (the container, theme, etc)

Is it possible to just call the field I want? I know I could create a whole custom theme for the view without markup but I'm hoping there is an easier way.