Copied to clipboard

Flag this post as spam?

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


  • PedroM. 28 posts 87 karma points
    Feb 21, 2014 @ 19:00
    PedroM.
    0

    Create Views when installing a theme package

    Hi,

    I'm making a theme package and on the package.xml is all defined as the previous packages , made some changes to Mvc, but now instead of creating the templates on the ~\Masterpage folder I need to be created on the ~\Views folder but is always creating the templates as Default.master and not Default.cshtml on Views.

    Is there something to explain how to make this change?

     

     

     

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Feb 24, 2014 @ 15:24
    David Brendel
    0

    Have you tried to change your umbraco instance where you create the package to MVC?

    Do your DocumentTypes actually use the mvc views and not the masterpages?

    As far as I know there is no "trick" to enable views instead of masterpages when creating a package.

  • PedroM. 28 posts 87 karma points
    Mar 04, 2014 @ 16:55
    PedroM.
    0

    Hi David thank you for the reply

    By default the settings is poiting to MVC

     <templates>
        <!-- To switch the default rendering engine to MVC, change this value from WebForms to Mvc -->
        <defaultRenderingEngine>Mvc</defaultRenderingEngine>
      </templates>
    

     

    In the package.xml is define as normal the template

        <Template>
          <Name>Text Page</Name>
          <Alias>umbTextPage</Alias>
          <Master>umbLayout</Master>
          <Design><![CDATA[@inherits UmbracoTemplatePage .....

    ......

     

    I'm not seeing why is not putting the templates in the Views folder.

     

  • PedroM. 28 posts 87 karma points
    Mar 11, 2014 @ 13:10
    PedroM.
    100

    The I manage to get a solution to this, was by adding on the Alias the file extension .cshtml

    <Template>
                <Name>Theme Default</Name>
                <Alias>ThemeDefault.cshtml</Alias>
                <Design><![CDATA[@inherits Umbraco.Web.Mvc.UmbracoTemplatePage more page content....]]></Design>

    </Template>

    Umbraco creates the file at the Views folder but like this

    ThemeDefaultcshtml.cshtml

    It's strange to be like this but is where I want.

    Nobody had this "issues"?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 11, 2014 @ 16:51
    David Brendel
    0

    Hadn't seen this issue before.

    Currently doing some package installation and testing of a package i created and my DocumentTypes and views are correctly installed in the views folder as .cshtml views.

    Sadly no clue what happens on your installation that causes this issue

  • PedroM. 28 posts 87 karma points
    Mar 11, 2014 @ 17:08
    PedroM.
    0

    Hi again David, thank you for replying again.

    Maybe my problem is by not creating the DocumentsTypes?

    It's possible , if I send you a package, for you have a look to it?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 12, 2014 @ 11:47
    David Brendel
    0

    Hi Pedro,

    don't think that it's necessary to create the DocumentTypes but you can test that.

    Sure if you post a link where i can get the package i can install it and test what happens.

  • PedroM. 28 posts 87 karma points
    Mar 12, 2014 @ 12:34
    PedroM.
    0

    So can you have a look to the theme package I have

    https://www.dropbox.com/s/asa3rld4z19gib2/Extract_First.zip

    Can you tell me if is working for you?

    You need to extract the first zip, there will also have a installation manual if you want to have a look, but you just need to upload the TheBootstrapTheme.UMB7.zip in Umbraco

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 12, 2014 @ 16:38
    David Brendel
    0

    Hi Pedro,

    installed the package and the installation went without problems. Also the two theme files were installed.

    Changed the master of one of the templates and this is the outcome:

    enter image description here

    So think that all went as expected.

  • PedroM. 28 posts 87 karma points
    Mar 12, 2014 @ 16:46
    PedroM.
    0

    thank you for testing :)

    So you didn't find anything not normal on the package. The why the files are named in the Views folder since I'm using the .cshtml on the Alias of the master templates?

     

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 12, 2014 @ 17:11
    David Brendel
    0

    With which method have you created the package? since the zip file itself seems a little bit strange.

    The folder with the content is not named with a guid and normaly umbraco packages have only one main folder.

    Maybe that causes the problem.. But thats the only thing a found on a first glance. Will have a look again tomoroow. Maybe I find something else then.

  • PedroM. 28 posts 87 karma points
    Mar 12, 2014 @ 17:22
    PedroM.
    0

    We have a automatic theme generator that creates the package. ( bindtuning.com )

    I'm changing the generator to create packages to Umbraco 7 version.

    That GUID folder is required to the package? We didn't use for the previous versions of Umbraco.

    Thank you again for your help.

    It is possible to send me your personall contact or if can create an account on our site and send to [email protected] , So I can offer you a theme donwload for the help?

     

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 13, 2014 @ 11:19
    David Brendel
    0

    Hi Pedro,

    ah ok so you create the package with a third party tool. Don't really know if its required, seems not so becauso your package is installed and can be installed. Think the most important part is the xml file where everything is serialized to.

    I just created the packages only directly from umbraco backoffice. But i think it would be good practice to imitate the normal package look as good as possible.

    The theme offer is really nice of you. Will send you some acc details by mail.

Please Sign in or register to post replies

Write your reply to:

Draft