JS and Fonts within Themes, and export not including them

Vic Alfred Inting asked on October 16, 2014 08:37

I'm using Kentico 7.011 and am having issues with my JS and custom Fonts. I've placed these .js and font (.eot, .otf. woff, etc.) files under the theme folder (/app_themes/my_theme/scripts and ~/app_themes/my_theme/fonts).

Now, here are my issues:

  1. When I proceed to my Theme (site manager -> development -> css stylesheets -> edit), I see the folders for fonts and scripts but on clicking them, no files are displayed (I initially uploaded them via FTP).
  2. When I export the Theme or the entire Site, the fonts and scripts folders (and the files underneath) are not included.
  3. Even if I update the site settings (site manager -> settings -> content -> media) for allowed extensions under security to include my file types (js, eot, woff, etc.), I still get the prompt that the files I'm trying to upload are not allowed.

Appreciate if anyone can help me with the issues above.

I'm trying to create a clean export package for a client to import easily without the hassle of having to upload further font and js files manually.

Recent Answers


Petar Kozjak answered on October 16, 2014 12:28

Hi,

usually we place all Fonts and CSS in CMSTemplates folder. I think everything is exported from this folder.

Here is more details: link text

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 16, 2014 13:57

If you're using Portal mode there isn't a CMSTemplates folder because you don't create physical page templates. For export/import to work properly is to follow the best practices for export folder structures (same link as Petar shared).

Pay very close attention to your sites code name as most everything you need to work with export/import revolves around this. If your sites code name is MySite and your theme in the App_Themes directory is my_theme, by default Kentico will NOT export that because they names are not exactly the same. Same is true for a global site folder in the root of the site.

Regarding uploading those font files via the UI, I don't believe those extensions were added until later in v7, but I could be wrong.

0 votesVote for this answer Mark as a Correct answer

Vic Alfred Inting answered on October 17, 2014 06:55

Appreciate the answers Petar and Brenden. I'm using Portal mode.

Brenden, I may have not mentioned this but the export file contains my theme, it just ommits the JS and Fonts folders, which is my issue.

I have a question though, if I manually update the export file to include my folders, and then import it. Would it work?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 17, 2014 14:23

Good to hear you're using Portal mode! It would work to manually update your export, although you introduce the risk of corrupting the export files. Do you have the opportuntiy to run any updates against the site? I wasn't able to find it but I'm sure there is a hotfix that has this resolved in it. You might also email Support and check with them.

Regarding JS files, Kentico has a place for them as well that is not in the App_Themes directory where you can get at them from the UI easier. In the /CMSScripts/Custom/

0 votesVote for this answer Mark as a Correct answer

Vic Alfred Inting answered on October 19, 2014 07:14

I've read somewhere that portal mode would be the way to go moving forward, so I stuck to it.

Going back, tt's totally weird, I just did the export again and it now has the files. I apologize if this has been a waste of your time. Thanks guys!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.