1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / NewsView in Page Template

NewsView in Page Template

6 posts, 0 answered
  1. KeyOfJ
    KeyOfJ avatar
    7 posts
    Registered:
    29 Apr 2009
    02 Sep 2009
    Link to this post
    I have added a NewsView into my page template and created and updated ItemListTemplatePath to point to my custom design. When a user clicks on a link in the NewsView it should take them to a page called News.aspx that was created that has a NewsView on it. This page uses the same Page Template so there are two NewsViews on it. One in the left hand column that is pulled from the page template and then one in the main content area for displaying the full story.

    In the page template when I edit the News View, it will not let me select a page to "Use a page especially prepared to hold the full info". It does not recognize the News.aspx page so I can select it. I am forced to let it generate a dynamic page?

    What am I doing wrong? I want it to go to news.aspx so I can adjust the template for the control.

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Sep 2009
    Link to this post
    Hello Michael,

    When you press"Select"  can you open the selector that shows all available pages? Could you send us some screenshots. I triad to reproduce the problem with no avail using Sitefinity 3.7.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. KeyOfJ
    KeyOfJ avatar
    7 posts
    Registered:
    29 Apr 2009
    02 Sep 2009
    Link to this post
    Ivan, what I found was that the news.aspx page was not set to show in navigation so it would not let me select it because it was being hidden. I corrected that, but now that I can select the news.aspx page, it still does not direct to it when clicking from the NewsView control.

    Here are the screen shots:

    Template
    Template NewsView Settings
    News Page
    News Page Advanced Behavior Settings
    News Page Advanced Appearance Settings

    I stopped the application pool and websites and restarted each to see if that would refresh. Also tried refreshing the master page. Also cleared the ServiceAssemblies directory.

    When you click a link in the left NewsView that is part of the page template it takes you to something like the following:

    http://help.n-focus.com/news/09-09-01/Server_Data_Load_Scheduled.aspx?News=NewsItem
    (That is an internal link so you will not be able to access it)

    Screen Shot: Generated Page for News Detail

    Thank you for you help.

    Michael
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Sep 2009
    Link to this post
    Hi Michael,

    As I see it you are redirected on news.aspx page. The other part of the url comes form our urlRewriter which format can be set for each provider.

    http://help.n-focus.com/ - this is your subdomain
    news/ - this is your news page
    09-09-01/ - this is the publication date of this news item
    Server_Data_Load_Scheduled.aspx - this is the name of the content item.
    ?News=NewsItem - this is a query sting appended . You can disabled it from Advanced tab of NewsView control, QueryStringKeys category, then set
    ContentItemKeyPersistance property to None.

    The url is formatted as below because of the following attribute that is set in your web.config - News provider

    <cmsEngine defaultProvider="Generic_Content">    
                <providers> 
                    <clear/> 
     ....... 
        ........ 
    <add name="News" urlRewriteFormat="[Publication_Date]/[Title].aspx"........./> 

    If you want you can change this format although it is not recomended. Let us know if there is anything else that we can do for you.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. KeyOfJ
    KeyOfJ avatar
    7 posts
    Registered:
    29 Apr 2009
    02 Sep 2009
    Link to this post
    Ivan,

    I think I understand what it is doing then. It takes the news.aspx page (which technically is in the db) and makes that a folder in the URL for formatting purposes of the URL...

    If I tell the NewsView control to "Auto-generate a page that is the same as items list page" I end up at the same URL. That is why I am being confused.

    Will either of these settings have the same resulting URL then? Just with the custom page I can do further editing?

    Thanks...I really appreciate how fast your team responds to these.

    Michael
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    03 Sep 2009
    Link to this post
    Hello Michael,

    You can change urlRewriteFormat in the provider. Then the url will be differently formatted. For instance you could remove the publication date and use only the title(urlRewriteFormat="[Title].aspx")

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered