2sxc - dnn - News app v3.1.5 - Problem with filtering - dotnetnuke

Hello 2sxc News app experts,
hopefully you can help me with my 2sxc News app v3.1.5 (2sxc v10.25.2).
I am struggeling with following problem: On one page I inserted the News app. Created some categories (category1..3). After this I created some news items and chose one category for every news item.
After this I created a News module on another tab to show the newest 3 items of a dedicated category. I modified the ViewConfiguration (id of the previous module, tab of the previous module, "category1").
What I expected was to see all news items of "category1". But unfortunately I see all items. The filter did not work.
What I tried so far (with no success):
Recreation of categories (delete categories from news items, deletion of all Categories, creation of categories, adding one category to a news item).
Export and reimport of data (export all data to xml, deletion of all data, reimport of all data)
What I can see in query designer is, that the link from "ModuleDataSource" to "View Category" is showing 1 item (probably the category of the ViewConfiguration), but the result of RelationshipFilter after "View Category" to "StreamFallback" is showing 0 items. So the fallback comes in play and all items are showing.
From here I have no idea what to check or what to configure, to get the Category of the ViewConfiguration get working. Has anyone a hint or an idea?
Any help is appreciated. Thank you very much!

welcome to StackOverflow :)
So first of all - we just released a new News app V4 today! https://2sxc.org/en/apps/app/news-app-v4
It's a complete rework of the News so if you're just getting started - I would start there. My guess is whatever you need is already fixed ;)

Related

A questionnaire page with multi select dropdownlist in MVC5

I'm new to MVC, This might be simple but I've looked everywhere for a solution and no luck. My problem is that I have a page that will contain many drop down lists of lines and not just one word. The user must select at least one line or more from each list. when they hit submit, all the selected items need to populate either on a pdf or a blank pop up as TXT. I've looked into enums, select2, chosen, Bootstrap select... the project I'm adding this page in is MVC5 code first approach with a database of users, the users function is to have roles assigned for different questionnaire. any help will be greatly appreciated. Thank you!

Get content Id (nid) from path on views block

I just can't seem to wrap my head around Drupal relationships. I have been reading and watching tutorials, but as soon as I try to get my own project done - I fail. I think it's very basic, so I would love to understand it. Maybe someone here can help me understand how it works :)
On my drupal site, I want to keep track of some private game tournaments.
I have created a content type called contestant, which has fields like: Tournament date, Player name, Final Position. I can then create a view that list the information from one tournament. I used the help I got from this thread: drupal views dynamic filter
I would like to have the view described above as a block. And then place that block-view on a "tournament description" page. I could do this, by simply creating a new block each time, and then manually place it on the page it should be shown (structure-->Blocks-->configure), but that is not an elegant way to do it. I am pretty sure this is where Relationships should be used. But I fail to understand how to create this relationship, so that the specific block view, that matches the specific tournament description page will be displayed together.
Use a Content:Nid as a Contextual filter.
WHEN the Filter value is not in the URL >>
Provide default value
Content ID from URL

How to know the link clicked by the user to set the breadcrumb using views in drupal 7?

I'll try to explain my problem giving a little context first.
I'm building a catalog of products and to categorize them I'm using a taxonomy tree with 4 sublevels. Each product can be related with one or more subcategories.
I used views to navigate the taxonomy tree to access the products related with each subcategory. To manage the breadcrumbs in here I redefined the hook_breadcrumb() function on my template.php and this is working perfectly.
The problems start here: when I get to the last level of subcategories I have the respective products and when I click one of the products it will enter the node page of that product. At this time I lose my breadcrumb trail because I entered the node. I could get the taxonomy tree of that product to build the breadcrumbs but the problem is that the product can be related with multiple subcategory terms.
So, in order to solve this problem I think that I need to know from wich path trail the visitor arrived to the product. In other words, I need to know the last taxonomy subcategory that the user visited to enter a specific product so that I can build the breadcrumbs correctly with that information.
So, can someone help me on how to know the path that the user was before entering a node?
Thanks in advance!
You can check http://drupal.org/project/cookiecrumbs a recent project which uses browsers history to show breadcrumb

Node referencing: How do you display (with VIEWS) a node(edition) with all its references (articles)?

Ingredients:
Drupal7 + References + Views module installed 2 content types:
magazine issue + magazine articles (for each issue)
Article c-type has a reference field: issue_no which displays the
issue it belongs
I made a Views to display me a plain list of issues only.
Requirements
1. When I click on the issue in the issue list I want to see all its references nodes(=articles) attached
2. I need to highlight the latest issue in the list by creating a separate page VIEW on the frontpage that contains articles of the latest view.
I would appreciate any help.
Recently I have done something similar for a project. In article view page go to advanced-> add a contextual filter of issue no. In magazine issue view page in fields-> add -> add a custom text field -> rewrite results -> select Output this field as a link to link it to your article view page with argument as issue no.
For example if your article list view page is article_list, you can add a rewrite result in custom text as article_list/[field_issue_no]; where [field_issue_no] is your issue no field.

How do you display info from a database

I have figured out how to add data from a model into a grid like the examples on the learning section of the Agile Toolkit website. But I'm looking for the correct way to show data from a database without a grid.
Say I have a news database and I want to display it as a blog style news on my home page. Can someone point me to where to begin?
Trying to make this a little more clear:
I want to display data from multiple columns from a table news. So I would need to know how to get the title, date, author, content and then repeat that for say 5 latest news articles.
try this:
$this->add('View',null,null,array('view/mytemplate'))
->setModel('MyModel')
->loadData(123);
then inside templates/defaults/view/mytemplate.html
<div><h2><?$title?></h2>
<p><?$content?></p>
</div>
You can also use it with any view, even page.
$data=$model->get();
$page->template->set($data);
you can re-define template for your page by defining defaultTemplate function
function defaultTemplate(){
return array('page/mypage');
}

Resources