Hi to all,
I am Alberto and i've just start tu use orchard. I am using it for building up a website but at this point i am facing a problem.
I want to put in the footer (FooterQuadThird) of all the pages a list of Events & News with a customized rendering and this is what i did.
- I created a custom content type News with the necessary informations and a List that contains these News.
- In the dashboard, widgets page i added the list in the FooterQuadThird using the Default layer...so it can appear in all the pages.
- The for customizing the rendering i used the alternate Widget-FooterQuadThird.cshtml
with this content
<h3>Events and News</h3>
- Then i used the alternate Parts.ContainerWidget.cshtml with this content
IEnumerable<object> items = Model.ContentItems;
@foreach (var item in items)
- Then as last i used the alternate Content-News.cshtml for customizing the way for rendering the single news in the list.
Something like this.
ContentItem contentItem = Model.ContentItem;
string date = ...;
HtmlString body = ...;
<li><strong>@date</strong> - @body @Html.ItemDisplayLink( "Read", contentItem)</li>
At this point the rendering of the list of news in the footer of all the page is ok...as i want.
The problem appears when i click on the links of this list...for opening the details of a single news.
What i see is still the rendering from Content-News.cshtml.
Tried to solve the problem in 2 ways...but without good result.
The url of each single news is following this structure 'http://localhost:30320/companynews/ + news_title'.
Looking for an alternate in the page of the single news i found Content-url-companynews.cshtml thinking that this can eventually have priority compare to
Content-News.cshtml. But the rendering is still wrong.
I tried to specify and alternate using the Placement.info file in this way.
in the tag for alternate i tried also Content__url__companynews, but the result is the same...always the rendering as in the list.
Is there anyway met the same problem or give a suggestion on the solution?
Thank you so much.