Need to create a Views page displaying tabular data.

Fields I need are:

1) Total count of nodes created from Content Type A, filtered by US State, and the 2) second field is the total count of nodes created from Content Type B, filtered by US state.


Create two block display of a view. The view should contain All content types. displays are block_1 and block_2. set content type:Content Type A as filter criteria for block_1 and content type:Content Type B as filter criteria for block_2. so block_1 and block_2 shows all of the nodes of A and B. This link shows how to count number of results. Now the following code

<?php print views_embed_view('YourView','block_1');?>
<?php print views_embed_view('YourView','block_2');?>

outputs the number of results and you can format them in any way you want.

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.