• About Us
  • Blog
  • Basket
  • Account
  • Sign In
  •  

Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Feb 2015 05:23 AM by  Eric B
(CLOSED) Umbraco 7 Help
 5 Replies
Sort:
Topic is locked
Author Messages

Eric B



New Member


Posts:
New Member


--
25 Feb 2015 10:43 PM
    Good morning all Need urgent help with this I have a site running Umbraco 7 and have installed the 51degrees.mobi package for Umbraco It has installed a bin file and a 51degrees.config file in the ~/App_Data directory The problem I am having is no matter what changes I make to the redirect part of the config file (even removing it completely) when accessing it from a mobile device it always redirects to /Mobile/Default.aspx I can not seem to get a log file created to see what is happening either We are trying to use alttemplates to display the current website data in new templates so we are looking for a solution to do this. The other issue we have is we have 14 different templates to display different data in the website ... and we need to figure out how to use different alttemplates depending on when template was originally asked for Any help you can give us on this would be greatly apprecicated Many thanks Eric
    0

    Mike



    Basic Member


    Posts:147
    Basic Member


    --
    26 Feb 2015 09:58 AM
    Hi Eric, Redirection: Have you restarted the website/recycled the app pool? Any changes in the config file require a website restart. Log: please check the detector has adequate write permissions for log.txt to get created. Templates: the redirection is mostly URL based, so it may be tricky. Could you please provide more details on how it's used? Kind Regards, Mike
    0

    Eric B



    New Member


    Posts:
    New Member


    --
    26 Feb 2015 11:45 AM
    Hi Mike Thanks for your quick reply I will try restarting the app pool shortly and see if that solves the first issue How do I find out what permissions the Detector currently has and what should the permissions be? I assume they are different to the worker process thread that we set for everything else? What we are trying to do is: Our client already has a website with content loaded and they have requested a mobile version of the site. We would prefer to use the content already loaded for the site and have simplified templates rather than having a separate version of the site for mobile devices. Currently our template structure looks like this: [img=http://www.geofabrics.co.nz/templates.png]current templates[/img] We were thinking of creating a mobile set of templates using the same names as the current ones but appending Mobile to the end eg: homeMobile and use altemplates in Umbraco and have the url look something like /?alttemplate=homeMobile to display the home page using mobile templates I am not sure whether this can be done or if there is a better way to achieve this so we are open to suggestions as to the best way to achieve this. Many thanks for your help Eric
    0

    Mike



    Basic Member


    Posts:147
    Basic Member


    --
    26 Feb 2015 02:47 PM
    Hi Eric, The AppPool needs to have write and modify permissions for the App_Data folder to write to log file. It should be possible to achieve template switching using the redirection module where user would be redirected to a certain template based on a number of detection properties. Redirection module is capable of appending strings to the URL. For more information please see: https://51degrees.com/support/docum...g/redirect Of course the limitation is that only the detection properties such as IsMobile can be used as conditions. Hope this answers your question. Please let me know if I can be of any further assistance. Kind Regards, Mike
    0

    Eric B



    New Member


    Posts:
    New Member


    --
    26 Feb 2015 06:34 PM
    Hi Mike Thanks again for your quick reply I will check the permissions shortly. I have tried restating the App Pool once changes were made to the config file and they now work I assume with the direction I would need to setup different locations for each template? If that is the case what would the location look like as I am not sure how you would get what template is being used Many thanks again Eric
    0

    Eric B



    New Member


    Posts:
    New Member


    --
    28 Feb 2015 05:23 AM
    Hi everyone I have been playing with this and come up with a solution ... although it seems less than ideal or very elegant I have commented out the and tags in the config file. I am lead to believe that this will still allow the site to access the framework using Request.Browser.IsMobileDevice I have then created a small UserControl with the following CodeBehind: if (Request.Browser.IsMobileDevice && (Request.QueryString["alttemplate"] == null || Request.QueryString["alttemplate"] == string.Empty)) { Template t = Template.GetTemplate(Node.GetCurrent().template); Response.Redirect(this.Context.Request.AppRelativeCurrentExecutionFilePath + "/?alttemplate=" + t.Alias + "Mobile"); } Which will do a redirection if the device is mobile and there isn't already an alttemplate specified. I will look at adding a session variable as well so the end user can choose between the desktop and mobile versions of the site and modify the menus so that the mobile version will load the alttemplate to all its URL's and save contact redirections As I said it works but it is nowhere near elegant Any further suggestions would be greatly appreciated Cheers Eric
    0
    Topic is locked