Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Imrankhan Pathan 14 posts 33 karma points
    Sep 08, 2012 @ 12:44
    Imrankhan Pathan
    0

    Create dynamics pages in umbraco for front panel

    Hello friends,

    My structures for content Tab as following way.

    Content:

       Home [Static Page]

       Product[Static Page and Load usercontrol in this page in Template]

    I have one button in that usercontrol. I have some selection controls in this control when click on button then it should redirect to another page.

    Now my questions are:

    1. Should we have to create content page for every page and load user control?

    2. Suppose I have second page "productInfo.aspx" in location "root/products/" and I redirect to productinfo.aspx page on button click event then it says "Page Not Found" page.

    3. If I have almost dynamic project and if they are not possible conditions to create content page then we develop website in umbraco. What are work around in umbraco for dynamic pages

    Any tutorial or reference websites will be greate to me to learn possiblitis on dynamic website.

    Thanks

    Imrnakhan

  • Drew 165 posts 340 karma points
    Sep 08, 2012 @ 12:55
    Drew
    0

    1. For *content* pages, you should really have one page each.
    For a product page you could either create a page for every product in the CMS, or you could just have one and pass through the product ID in the querystring using a  URL rewrite rule, so:
    www.mysite.com/products/my-amazing-product    would actually be referencing   /productPage?productId=1222

    2. If you want to use another page inside an Umbraco website that is not managed by Umbraco (i.e. the page is not created or managed by the CMS), such as a plain ASPX page or legacy page/website then you need to add the directory that the page lives in to the umbracoReservedPaths in the site web.config.
    This will then mean that for any requests to pages that are stored in that directory (such as /umbraco/ and /install) Umbraco will not try to handle the request, it will pass straight through to IIS. 

    <addkey="umbracoReservedPaths"value="/umbraco/,/install/,/products/"/>

    3. As per point 1, rather than create lots of product pages in Umbraco you can have a single "displayProduct.aspx" type page, that accepts a product ID in the querystring, but you use a URL Rewrite rule so that a "pretty URL" is shown to the user, whereas the actual product ID is passed through behind the scenes.

     

    Cheers,

    Drew

     

  • Imrankhan Pathan 14 posts 33 karma points
    Sep 08, 2012 @ 13:05
    Imrankhan Pathan
    0

    Hi Drew

    Thanks for your response.

    Actually I am looking for second option that you described in above post. Now Page is loaded but have some issue.

    Lets assume. I have one template Setting/Templates called "MasterTemplate". In this template, I have put one umbraco page field suppose it is "page_header_text"

    which is defined property in its document.

    Now, I have created aspx page in "products" folder[not a content page] and select master page "MasterTemplate".

    So when I load this page then obviously "page_header_text" gets null because its not related to that document and I am getting error "

    Object reference not set to an instance of an object."

     

    Is it also possible that page, which I have created in folder, set related properties of that document?

    Thanks

    Imrankhan

  • Drew 165 posts 340 karma points
    Sep 08, 2012 @ 13:13
    Drew
    0

    Do you have the full error message for "Object reference not set to instance of an object" ? - there should be more to that error message.

    Here is a thread of people who have done the same thing as you - they have used the Umbraco Master page with a page/site outside of Umbraco:
    http://our.umbraco.org/forum/using/ui-questions/7648-Extending-a-web-site-outside-of-Umbraco-Best-practices 

    One common problem appears to be the IIS settings.


    Cheers,
    Drew 

     

  • Imrankhan Pathan 14 posts 33 karma points
    Sep 08, 2012 @ 13:17
    Imrankhan Pathan
    0

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.item..ctor(IDictionary elements, IDictionary attributes) +666
       umbraco.presentation.templateControls.ItemRenderer.GetFieldContents(Item item) +426
       umbraco.presentation.templateControls.ItemRenderer.ParseMacros(Item item) +72
       umbraco.presentation.templateControls.ItemRenderer.Init(Item item) +9
       umbraco.presentation.templateControls.Item.OnInit(EventArgs e) +95
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Control.InitRecursive(Control namingContainer) +311
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
    

  • Imrankhan Pathan 14 posts 33 karma points
    Sep 08, 2012 @ 13:35
    Imrankhan Pathan
    0

    Is it possible to set my static NodeId to all dynamic pages?

    For example, I have content page it is called "Product" where it displayed page title, description etc. So if I set this page node id to dynamic page so it behave like product page and other content of this page also displayed.

Please Sign in or register to post replies

Write your reply to:

Draft