New blog post: Building a News app with 2sexycontent

Sep 26, 2014 at 4:31 PM
I just posted my first post in a series of blog of module development using 2sxc. The first one is a News app functionality based on NewsArticles module. So you have a new listing view, with included detail view and 2 helper views for the categories and one for the most recent items. Most of the items there have already been in sample apps or in example code on the 2sxc site but it also includes a sample of how to make a pagable dataset using Linq. You can read it here
Coordinator
Sep 26, 2014 at 4:51 PM
love it :)
Sep 26, 2014 at 6:06 PM
Very cool @nokiko!
Sep 26, 2014 at 7:32 PM
Just installed the app, looks great... but the article urls and pager urls are pointing to ~/Host/Backup/portalid/0 instead of the page the module is located on.
Sep 26, 2014 at 7:37 PM
Edited Sep 26, 2014 at 7:37 PM
You need to set the newsurl in the app settings
Sep 26, 2014 at 9:17 PM
Edited Sep 26, 2014 at 9:19 PM
Ok, I missed that part in the blog post. But there's a problem... when I go to browse, it doesn't show the page the app is located on.

The page is /contact/test-page-2, but it's a no-show in the tree view.

Image
Sep 26, 2014 at 9:21 PM
an annoying dnn issue

it does not show the page of the one you are on

go to any other page where you have an app installed

now go to app management adn then edit the one for this app from there and you shoudl see it.
Sep 26, 2014 at 9:32 PM
That got it to work, thanks! I've noticed that issue before using the page picker on another app.
Oct 4, 2014 at 12:00 PM
Very nice, nokiko. Thank you.
Oct 4, 2014 at 12:04 PM
no problem

if you have ideas for other blog posts let me know
Oct 6, 2014 at 8:20 AM
tryed, insert a news but I receive this error
There was an error while rendering the template: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Impossibile eseguire un'associazione di runtime su un riferimento Null in CallSite.Target(Closure , CallSite , Object , String ) in ASP._Page_Portals_0_2sxc_2DNN_App_News__NewsItem_cshtml.Execute() in d:\archivi_web\www.xxx.it\www\Portals\0\2sxc\2DNN_App_News\_NewsItem.cshtml:riga 16 in System.Web.WebPages.WebPageBase.ExecutePageHierarchy() in System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) in System.Web.WebPages.WebPageBase.Write(HelperResult result) in ASP._Page_Portals_0_2sxc_2DNN_App_News__News_cshtml.Execute() in d:\archivi_web\www.xxx.it\www\Portals\0\2sxc\2DNN_App_News\_News.cshtml:riga 93 in System.Web.WebPages.WebPageBase.ExecutePageHierarchy() in System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) in ToSic.SexyContent.Engines.RazorEngine.RenderTemplate() in ToSic.SexyContent.Engines.EngineBase.Render() in ToSic.SexyContent.ViewApp.ProcessView()
can you help me?
Fabio
Oct 6, 2014 at 8:56 AM
Hi

looks liek you forgot to fill in an item its expects a value it can not find

have you filled in all field and also set the app settings and resource?
Oct 6, 2014 at 10:36 AM
you mean this?
Image

I have this informations saved
Fabio
Oct 6, 2014 at 12:09 PM
I could reproduce your error by keepign the dat and time empty

Make sure you set the data and time ( thats not auto filled in 2sxc yet )
Oct 6, 2014 at 2:20 PM
Data and Time? where?
Oct 6, 2014 at 2:22 PM
date and time for each news item
Oct 6, 2014 at 2:53 PM
OOOOOOOOOOOOOOOOH! yes is this!!!!!
Oct 6, 2014 at 3:36 PM
Hi 2 questions

1 for category I can't add category directly from the module, I need to insert in the management
2 I can't delete news? when I press Delete nothing appear.
On the event viewer

System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.LoadQueueFromTimer()
at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.Start()

Fabio
Oct 6, 2014 at 3:51 PM
  1. yes I have not added the abillity to have the correct admin option so you can edit directly from cat module you will ahve to do it in the manangement
  2. cant help you with that as I have no idea what that could be