2.65-Help with deploying

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
hi ... quick question.
i've 2 sites, one on the server another on my localhost.  They're identical.
I've been updating the colors/move the divs left/right/up/down, then ftp the css from local to the other server, no problem so far. Now I'm starting to do something that i need to touch the actual code, for example, in the _root.head.cshtml file, i added another line to use google font:
Html.AppendCssFileParts(@Url.Content("http://fonts.googleapis.com/css?family=Inder|Quattrocento+Sans:400,700|Droid+Sans|PT+Sans+Caption"));
then update the css to pick up that font.  It works perfectly on my localhost.
when it's done, i ftp the css, i can see the new font on the server.  But the page doesn't render the new font because i haven't moved the other part that has the google font line referrenced.

could you let me know which file i need to ftp over beside the css file? do i have to move the entire site?

i did also added a few links to the footer too, but same problem, dont know which files to ftp

thank you,
11 years ago
tlp560 wrote:
hi ... quick question.
i've 2 sites, one on the server another on my localhost.  They're identical.
I've been updating the colors/move the divs left/right/up/down, then ftp the css from local to the other server, no problem so far. Now I'm starting to do something that i need to touch the actual code, for example, in the _root.head.cshtml file, i added another line to use google font:
Html.AppendCssFileParts(@Url.Content("http://fonts.googleapis.com/css?family=Inder|Quattrocento+Sans:400,700|Droid+Sans|PT+Sans+Caption"));
then update the css to pick up that font.  It works perfectly on my localhost.
when it's done, i ftp the css, i can see the new font on the server.  But the page doesn't render the new font because i haven't moved the other part that has the google font line referrenced.

could you let me know which file i need to ftp over beside the css file? do i have to move the entire site?

i did also added a few links to the footer too, but same problem, dont know which files to ftp

thank you,


It appeared to me that this is a theme problem. I would suggest you create a new theme and do the modification on the theme. You can copy DarkOrange theme (the whole folder) and rename the folder to a different name (remember to also edit theme.config to update the corresponding fields).

Then, to override a view (CSHTML), you copy the view from the ~/Views folder into the corresponding folder in your theme. For example, _Root.Head.cshtml resides in ~/Views/Shared folder, then you copy the file, and paste it under ~/Themes/YourTheme/Shared/_Root.Head.cshtml. Then you edit the file in your theme folder. Nop will automatically search for your theme folder for the View, and if it can't fine one, it will fall back to the default ~/View folder for the same View.

Anyway, I do not quite understand your line "because i haven't moved the other part that has the google font line referenced", perhaps if you can explain more then I can give a better advice.

:)
11 years ago
oh ok
so i made updates to 2 files. for example:
1. the css file: i change the header font from Arial to Droid Sans...something like:
h1 {font-family:'Droid Sans',Arial}


2.  then, for the page to render the Droid Sans font, I need to add a line the the head of the page, by adding :
Html.AppendCssFileParts(@Url.Content("http://fonts.googleapis.com/css?family=Inder|Quattrocento+Sans:400,700|Droid+Sans|PT+Sans+Caption"));

to the _root.head.cshtml file.

when i ftp, i only push the css file, and i can see the new font out there live. Nothing breaks the page, it just doesn't render the Droid Sans font because the change i made in #2 isn't out there.  I just don't know which file i need to ftp :-)


wooncherk wrote:


Anyway, I do not quite understand your line "because i haven't moved the other part that has the google font line referenced", perhaps if you can explain more then I can give a better advice.

:)
11 years ago
tlp560 wrote:
oh ok
so i made updates to 2 files. for example:
1. the css file: i change the header font from Arial to Droid Sans...something like:
h1 {font-family:'Droid Sans',Arial}


2.  then, for the page to render the Droid Sans font, I need to add a line the the head of the page, by adding :
Html.AppendCssFileParts(@Url.Content("http://fonts.googleapis.com/css?family=Inder|Quattrocento+Sans:400,700|Droid+Sans|PT+Sans+Caption"));

to the _root.head.cshtml file.

when i ftp, i only push the css file, and i can see the new font out there live. Nothing breaks the page, it just doesn't render the Droid Sans font because the change i made in #2 isn't out there.  I just don't know which file i need to ftp :-)




Anyway, I do not quite understand your line "because i haven't moved the other part that has the google font line referenced", perhaps if you can explain more then I can give a better advice.

:)


Just upload _root.head.cshtml to the ~/Views/Shared folder will be fine. :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.