Same View, different displays, One page, same exposed filters. Possible? - drupal-7

I want to list my content categorically within view. The problem is that I want all of it to be filtered through exposed filters.
Here is what Content Type looks like:-
Content Type (MyContent)
Title
Body
Category (it has three categories in it "Category1, Category2 and Category 3". User has to selects one when entering the content)
Now I created a view which lists all of the content linearly (like a normal list) and I have exposed filters on top, which filter the content, but now I am not sure how to proceed when I have to show the content as:-
Any Idea what I should do to achieve this? What should I do in this scenario?
I'll be grateful to you valuable assistance.
Best.

You can group your results together. Under the Format option in views next to your format type (unformatted list, etc...) click on Settings.
In this menu you'll see "Grouping field" this will allow you to specify on which fields your results should be grouped. The field needs to already be included in your display.
Once you enable this you'll probably notice that that field is now displayed twice. You can just go into that field and check "Exclude from Display"

Related

Need to have a custom field in salesforce object that will combine two other fields

We have a requirement where we need to combine two separate fields into one in the salesforce object and then removed those separate fields from the page layout but when the edit option is enabled in the salesforce portal to edit the object the eliminated fields should be there for edit. If further clarification is required, I can also do that
Click here to see the screenshot
I have tried the formula custom field type where I have to write a formula of concatenating the two fields like this given below:Text(Rent_Start_Date_Actual__c) & ","& Text(Rent_Start_Date_Type__c). I have also removed these two separate fields from salesforce page layout but it also gets removed when object window is in edit mode and we do not want that.
Rather than potentially messing with the edit page, have you considered using a simple screen Flow and an action to achieve this? For example, an action to 'Edit Rent Details' added to the page header, and then when clicked it presents the individual fields on a screen flow for editing? Once saved, the page would refresh and update the formula field as required.

PowerBI: Giving users the option to include or exclude a type of data

I'm creating my first PowerBI report, analysing staff absence data. The data contains a field of 'Absence Type', which categorises the type of absence the each record refers to.
I would like my users to be able to view my report both with and without the Absence Type of 'Pandemic'. I can hard-filter this on all pages by Excluding it but that gives the users no control.
I thought about using a slicer with a new custom column but I think that would be too confusing. If the column put a 'Yes' or 'No' as to whether the Absence Type was 'Pandemic', that would allow users to view the data without 'Pandemic' entries or just the 'Pandemic' entiries, but give no combined option. Even with a multiselect slicer they could easily deselect everything and see no results at all.
Ideally what I need is either an 'Include Pandemic?' slider where they can choose Yes or No (with Yes being everything and No being everything minus Pandemic records) or a button they can click to toggle the Pandemic records in or out of the visuals.
Apologies if this is has an obvious answer, I'm pioneering PowerBI for my organisation so don't really have anyone to ask here!
There's a way to do this, but it's a bit painful. So you'll want to consider just putting a slicer on AbsenseType and letting the user figure it out.
The extensibility point you can use here is Buttons and Bookmarks.
You can create two buttons, each associated with a Bookmark. Each bookmark can activate set of filters, so one can exclude pandemic AbsenseType and the other can include it. Bookmarks can also toggle the visibility of visuals (see eg here). So when the "ExcludePandemic" bookmark is active, the appropriate filter is active, and the "Include Pandemic" button is visible. When the "IncludePandemic" bookmark is active, the "Exclude Pandemic" button is visible.
In my opinion, the best solution would be tocreate a custom column that will have 2 values:
Pandemic - if the type is Pandemic
Non Pandemic - if the type is different than pandemic
You would then use this new column + Absence Type as a hierarchical slicer.
This would give the user the abilty to pick and choose between:
Select all (If the user deselects everything a select all will also be applied)
Non pandemic only
Pandemic only
Any one or more absence type

2sxc Dnn.. Add existing content items to module

I have a view of entities which are being displayed based on an entity type filter. I now need to reorder these and would like to use the built in 2sxc functionality to do this, so I have a created a new view of the data using the "module data source" so that the ordering will work.
But how do I now make all of the existing entities of the same type (definition) appear in this new view? The view now displays one item by default and I can replace that one item. But how do I add multiple existing items? I need the Entity ID's to remain the same for Query String usage and SEO.
Thanks, hope the question makes sense.
Cheers
I believe that you are asking "how can I add many items to an instance (module) manually, so that I can also sort them manually" - is this correct?
If yes, then you must make sure your template supports lists (checkbox in the template settings). This then gives you a [+] button; but you don't want to use that, as it would be for typing in new data. There's another button called "add an empty demo entry" which you'll see as a round (+) after pressing the more ... button once. Pressing this will give you empty entries, into which you can then replace existing items.

Drupal view with contextual filters returning blank screen

This is a very particular question so any input will be appreciated...
I'm using panels and views in a custom view template file in a drupal 7 site. The panel has a view embedded in it, as well as some extra content beneath. I have the view set with 3 contextual filters having taxonomy term pulled from url. This is working fine.
So if I go to something like
/search/ford/red
It will successfully pull all items having taxonomy term "ford" that also have taxonomy term "red" applied.
But interestingly enough, if I change one of the terms to something that exists in the vocabulary, but does not happen to have any relation to items that successfully pass the first criteria, it will just load the site wrapper with the panel blank. No errors of any kind, search filter box disappears, pagination disappears, even the other content embedded in the view disappears.
It doesn't seem to matter what I choose for "Action to take if filter value does not validate" for any or all of the filters applied to the view. I tried to set it to show no results, but I assumed it didn't apply since I am also using a custom template file for the view.
I expect it to show no results. But I also expect it to have the search bar up top so the user can select a different filter from the menu, as well as the other content embedded in the view.
The search box is custom to the view template file. The only reason it would not show is if the view itself does not load. In this case it looks like the whole panel is not showing.
Feel free to ask for specifics if this is not enough to go on. Thanks.
for future readers experiencing the many unexplained holes in drupal, here is the complete hack I had to do to prevent this unannounced error:
In my custom view I had to check the size of $view->result and then redefine it if empty:
<?php if(sizeof($view->result) < 1): $view->result = array(0 => array()); ?>
<div class="no-results">
There are no results.
</div>
<?php else: ?>
--- normal view loop here ---
<?php endif; ?>
No, simply adding a count provision to the result loop was not working. I don't know how drupal processes the views, but if I allowed the result array to be empty it would not display the contents of this panel.
Down side - It still doesn't display any of the other content embedded in this panel, so if I had another embedded view beneath this one it would mysteriously vanish.
Oh well, I'll just tell the admins they can't populate this page with anything but a filterable index. Phooey, but that's drupal life... POS.

Styling views in Drupal 7

I developed a content type of "sale car". Now I'm developing its view to display a brief list of Car Ads with some basic fields (car, model, color, price, link to full ad) inline of each other like this:
BMW, 120 d $X,xxx,xxx.xx
Royal Blue, Automatic, View Ad
I'm wondering how can I achieve this style? What style format I should use: Table, Grid or something else? Or do I need to get it done through coding?
You want to create a view that is a list of fields.
Once you've got this, add the relevant fields into the view and you should be done.
Choose the relevant format from the format link, check the preview and you should have your view.
To create the view structure:
Node 1 Node 2
Field 1 Field 2 Field 1 Field 2
Field 3 Field 4 Field 3 Field 4
Add all four fields to the view. On each one select "exclude from view". At the bottom of the field list, add a new "custom text" field.
Do exclude this one from the view though, that's important.
Go into the custom field and in the textarea you can enter HTML code and use the replacement patterns to output the field.
For example:
<h2>[title]</h2>
<ul>
<li>[field_one_name]</li>
<li>[field_two_name]</li>
</ul>
<ul>
<li>[field_three_name]</li>
<li>[field_four_name]</li>
</ul>
Get the name's from the Replacement Patterns box under the textarea.
Then select whatever format you think is right. I think you're after a grid.
Drupal provides a way to style the view.
Go to your view.
Click on 'Advanced' link at right side.
Click on link after the label 'Theme'.
You will get the list of templates used to style the view.
Create your own template with one of the given name in the list for
specific fields. e.g. views-view--VIEWNAME.tpl.php
You will get the view of your own style.
This is how the Drupal views styling works. :)
Styling views in Drupal 7:
Add field(which to display) and check the option "Exclude from display".
Now go to "Rewrite Results" and check the option "Rewrite the output of this field"
and below there is a section called "Replacement patterns" where all the added
fields appear as a variable(saying variable just for easy understanding)
Like :
[title] == Content:
Title[field_event_date] == Content:
Event Date[body] == Content:
Body[body-value] == Raw value
Above there is a text ares called "Text" where you can customise your style
for this field(Not good practice follow step 4 for better)and clicl "Apply All".
Now add one more field(this is an extra field) called "Global: Custom text"
DO NOT check "Exclude from display" and below text area called "TEXT"is
the area where we will be writing our HTML codes for styling the views
using all the fields which are avalable as token here under the option
"Replacement patterns".
Click on the "Apply All", And YES its done.So simple and cool na??

Resources