Skip to main content
added 140 characters in body
Source Link
Jimajamma
  • 17.1k
  • 1
  • 29
  • 35

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If the above doesn't take away all the html you want, you can either modify the templates as you mentioned above, or use something like this instead of views_embed_view:

$view = views_get_view('teaserview'); $display_id = 'default'; $view->set_display($display_id); $view->execute(); 

which will execute but not display the view ... but will create a $view->result which is an array of row objects basically, so you could then go in there and print out whatever you wanted.

To find out what is in there, throw in a

drupal_set_message('<pre>' . print_r($view->result, true) . '</pre>'); 

and you'll see what you can work with.

PS Once you have this working, I would put it in a preprocess hook and assign this output to a variable instead of putting any/all of this code in your page.tpl, too...

PPS I also am assuming you know that the Theme Developer module is throwing a lot of html in there as well (all those thmr='s as such).

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If the above doesn't take away all the html you want, you can either modify the templates as you mentioned above, or use something like this instead of views_embed_view:

$view = views_get_view('teaserview'); $display_id = 'default'; $view->set_display($display_id); $view->execute(); 

which will execute but not display the view ... but will create a $view->result which is an array of row objects basically, so you could then go in there and print out whatever you wanted.

To find out what is in there, throw in a

drupal_set_message('<pre>' . print_r($view->result, true) . '</pre>'); 

and you'll see what you can work with.

PS Once you have this working, I would put it in a preprocess hook and assign this output to a variable instead of putting any/all of this code in your page.tpl, too...

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If the above doesn't take away all the html you want, you can either modify the templates as you mentioned above, or use something like this instead of views_embed_view:

$view = views_get_view('teaserview'); $display_id = 'default'; $view->set_display($display_id); $view->execute(); 

which will execute but not display the view ... but will create a $view->result which is an array of row objects basically, so you could then go in there and print out whatever you wanted.

To find out what is in there, throw in a

drupal_set_message('<pre>' . print_r($view->result, true) . '</pre>'); 

and you'll see what you can work with.

PS Once you have this working, I would put it in a preprocess hook and assign this output to a variable instead of putting any/all of this code in your page.tpl, too...

PPS I also am assuming you know that the Theme Developer module is throwing a lot of html in there as well (all those thmr='s as such).

added 668 characters in body
Source Link
Jimajamma
  • 17.1k
  • 1
  • 29
  • 35

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If the above doesn't take away all the html you want, you can either modify the templates as you mentioned above, or use something like this instead of views_embed_view:

$view = views_get_view('teaserview'); $display_id = 'default'; $view->set_display($display_id); $view->execute(); 

which will execute but not display the view ... but will create a $view->result which is an array of row objects basically, so you could then go in there and print out whatever you wanted.

To find out what is in there, throw in a

drupal_set_message('<pre>' . print_r($view->result, true) . '</pre>'); 

and you'll see what you can work with.

PS Once you have this working, I would put it in a preprocess hook and assign this output to a variable instead of putting any/all of this code in your page.tpl, too...

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.

If the above doesn't take away all the html you want, you can either modify the templates as you mentioned above, or use something like this instead of views_embed_view:

$view = views_get_view('teaserview'); $display_id = 'default'; $view->set_display($display_id); $view->execute(); 

which will execute but not display the view ... but will create a $view->result which is an array of row objects basically, so you could then go in there and print out whatever you wanted.

To find out what is in there, throw in a

drupal_set_message('<pre>' . print_r($view->result, true) . '</pre>'); 

and you'll see what you can work with.

PS Once you have this working, I would put it in a preprocess hook and assign this output to a variable instead of putting any/all of this code in your page.tpl, too...

Source Link
Jimajamma
  • 17.1k
  • 1
  • 29
  • 35

If you go into the view thru the Views UI, and look at the fields, you can configure/remove the wrapper html from the field by selecting none for the wrapper of the field, and that should take a lot, if not all, of the html away that you don't want. Also, if you go into the views admin screen and go to tools, you can check the "Do not show hover links over views" which should remove the first edit portion of all of your views when looked at via an admin type account as well.