Forcing News to Open in a New Window
Is there any way to force the news module in list mode to open in a new window? Currently it's reloading the page with the full article in a small area of the page which doesn't fit properly.
I should clarify, when I say new window I don't mean a popup. I just mean refreshing the page and having the news article display full page rather then in a small area of the existing page.
I also found this in the Knowledgebase:
ItemListUrl and SingleItemUrl
These properties allow you to have the List and Details views to be
displayed on 2 different pages. This is how to do it:
However, SingleItemUrl and ItemListUrl don't seem to exist in Sitefinity 4.0 (unless I'm just missing them). Any help on solving this would be very greatly appreciated!1. Let’s say we have a page called Page1.aspx and we have a Content View control dropped on it. We want to make this page handle the display of the list of content items. We need to set the SingleItemUrl property to point to the URL of the page (Page2.aspx) where another Content View control will handle the display of the full content of only 1 content item.
2. Page2.aspx, as we said, needs to have the Content View control dropped on it and it will display the full content of only 1 content item. We need to set the ItemListUrl to point to the page (Page1.aspx) with the list of content items so that the user can navigate back to it if needed.
Hi Chris,
You could achieve the required scenario as follows:
SELECT
[id]
FROM
[dbo].[sf_page_node]
WHERE
[title_] =
'page1'
Hi Pepi,
Thank you for the response. Is there an easier way to get the Page ID? I'm still in development right now so I don't have a SQL database to run queries against.
Also, does the second page HAVE to be tied to the first page? We're very likely going to use the news list widget on multiple pages and in all cases we'll want the news to open in a new full page. Does that mean we're going to need to create a full page view for each page that news appears on?
Hi Chris,
Out of the box there is no view that lists the GUIDs of all page node. You can create a simple control where you can list all page nodes and the ids. You can use the fluent API to do this
var pages = App.WorkWith().Pages().Where(p => p.ApprovalWorkflowState ==
"Published"
).Get().ToList();
foreach
(PageNode node
in
pages)
var id = node.Id;
var title = node.Title;