Replace home page with a link to HTML doc

Last post 07-19-2006 5:30 PM by J7Mitch. 13 replies.

Sort Posts:

  • Replace home page with a link to HTML doc

    07-19-2006, 8:00 AM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40

    I'd like to display a single HTML file for one of my portals until its development is complete.  I was hoping I could link the home/splash page to a file on my site, but it appears not.  If a create a page which links to a file, it is no longer available to select as splash or home.

    I have several portals on the site so I can just change the site start page.

    Is there an easy way to acheive this?

     

    Thanks

  • Re: Replace home page with a link to HTML doc

    07-19-2006, 9:31 AM
    • Contributor
      2,021 point Contributor
    • hoopslife
    • Member since 12-29-2005, 2:29 PM
    • Fort Myers, FL
    • Posts 394
    Just create a blank aspx page and use Response.Redirect() ( in the form load) to link to the page you want.  Oh yea and make the blank page the start up page in your web application.
    Never Quit

    Microsoft Certified Solutions Developer

    Blog
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 10:18 AM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40
    This is one of several portals on the site and I only want to replace the one portal with the html page - I guess that's going to rule out the blank aspx page?
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 10:25 AM
    • Contributor
      2,021 point Contributor
    • hoopslife
    • Member since 12-29-2005, 2:29 PM
    • Fort Myers, FL
    • Posts 394

    Caroig:
    This is one of several portals on the site and I only want to replace the one portal with the html page - I guess that's going to rule out the blank aspx page?

     

    It shouldn't.  You should be able to link to a blank aspx page and then in the code behind redirect the user to the page you want them to see.  The user will never see the blank page using this technique.  Am I on the right track here with your problem?

    Never Quit

    Microsoft Certified Solutions Developer

    Blog
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 10:31 AM
    • Contributor
      2,021 point Contributor
    • hoopslife
    • Member since 12-29-2005, 2:29 PM
    • Fort Myers, FL
    • Posts 394

    If a create a page which links to a file, it is no longer available to select as splash or home.

     

    Can you clearify this statement some more?

    Never Quit

    Microsoft Certified Solutions Developer

    Blog
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 10:50 AM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40

    Sure - when I link a page to a file (in this case my HTML page) in advanced options, navigating to the page will display my HTML.

    If I then try to select this page as the home page or splash in the admin settings, the page does not display in the drop down list of available pages.  If I remove the link from the page settings, then it reappears in the drop-down.

  • Re: Replace home page with a link to HTML doc

    07-19-2006, 11:05 AM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    If you make the one and only Portal Alias for the portal in question point to your temporary page it will accomplish what you are trying to do.

    When DNN attempts to find the correct alias and it is not able to it will automatically redirect to the first Portal Alias.

     

    John M.

    DotNetNuke Module for Performance
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 11:31 AM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40

    Thanks John,

    But I don't get it.  My default domain on the site is, let's say www.default.com and my new portal (port n) is www.newsite.com .  If I change the 'only' alias for portal n to myfile.html - www.newsite.com will redirect to www.default.com ?

    Do child portals still work? I guess I could create a child portal and then edit its default.aspx.

  • Re: Replace home page with a link to HTML doc

    07-19-2006, 12:46 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    If you change the alias from www.default.com to http://www.default.com/myfile.html  then all requests will be redirected to the myfile.html page because that is not a real "alias".

    The wildcard function of the PortalAlias in DNN will redirect the user to the first alias entry if the alias they are requesting can not be found.

     

    John M.

    DotNetNuke Module for Performance
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 12:50 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

     

    Also, if you want to keep peole from accessing it through www.newsite.com then you will have to either remove that alias or change it to something else temporarily so that it can't be found when DNN does the lookup.

    John M.

    DotNetNuke Module for Performance
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 1:02 PM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40

    The only way I can see to achieve what I want is to create a skin that just loads my image and no dnn controls - so I think I'll go with that.

    Seems a shame that there's no easy way to do this - all the elements seem to be there.

    Thanks

  • Re: Replace home page with a link to HTML doc

    07-19-2006, 2:34 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    You couldn't get it to work with my method?  It should work, maybe I'm just confusing you with the terminology though.

    You can't make a skin that doesn't load the controls, the system is setup so they have to go somewhere. That is why a requirement for every skin is that you have a ContentPane in it.

    But using your approach you could do it by placing some javascript in the page to do the redirect.

    Something like this.

    <script language="Javascript1.1" type="text/javascript">
           location.href = 'www.newsite.com/mypage.html';
    </script>

    John M.

    DotNetNuke Module for Performance
  • Re: Replace home page with a link to HTML doc

    07-19-2006, 4:07 PM
    • Member
      200 point Member
    • Caroig
    • Member since 05-26-2004, 12:39 PM
    • Spain
    • Posts 40
    J7Mitch:

    If you make the one and only Portal Alias for the portal in question point to your temporary page it will accomplish what you are trying to do.

    When DNN attempts to find the correct alias and it is not able to it will automatically redirect to the first Portal Alias.

    I did try and it redirects to the default portal - if the domain I want to direct to the new portal is www.mydomain.com then using www.mydomain.com/anotherfile.html there is no match and it finds the default portal.

    Your right I did create a contentpane td in my image page.  Why will not going anywhere cause a problem? - I agree not the correct usage, but it does seem to do the job.

    Thanks for the ideas though.

  • Re: Replace home page with a link to HTML doc

    07-19-2006, 5:30 PM
    • Star
      13,145 point Star
    • J7Mitch
    • Member since 10-19-2002, 9:23 AM
    • Posts 2,632
    • TrustedFriends-MVPs

    Oh right, i guess didn't make that clear.  I was thinking about one portal.

    The system redirects to the default portal's first alias if an alias cannot be found.

    For the Skin thing, the modules will all be added to the ContentPane if the pane that they are originally assigned to cannot be found, so they will show up anyway.

    One way to hide them though is to place a little inline CSS in your Pane elements:

    <td id="ContentPane" runat="server"  style="display:none" >

    John M.

    DotNetNuke Module for Performance
Page 1 of 1 (14 items)