Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > GetResource and CSS Versions View modes: 
User avatar
Member
Member
bryanallott - 7/22/2013 5:04:38 AM
   
GetResource and CSS Versions
With respect the adding of the URLs in the HEAD section of the master template:

~/CMSPages/GetResource.ashx?stylesheet....

Is there a way to append values to the querystring so that I can get something like


<link href="/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/MySite/Style.css&v=2" type="text/css" rel="stylesheet">


Ultimately, what I'd like to do is add a version number to the resource files that are linked in (JS and CSS in particular).

Thanks

User avatar
Member
Member
kentico_davidb2 - 7/25/2013 6:40:59 AM
   
RE:GetResource and CSS Versions
Hi,
could you please try to describe your scenario again in more details? What exactly are you trying to achieve?

User avatar
Member
Member
bryanallott - 7/26/2013 2:41:58 AM
   
RE:GetResource and CSS Versions
Sure...
So the master template looks in App_Themes and pulls out all the CSS it can find in the subfolders of the main theme and appends them to the head of the HTML in the form below, right?


<link href="/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/MySite/Style.css" type="text/css" rel="stylesheet">


That is, before returning the response to the client. What I'd like to be able to do is append to that querystring but I can't find *where/how* that header element gets inserted...

?

User avatar
Member
Member
kentico_davidb2 - 8/5/2013 8:47:51 AM
   
RE:GetResource and CSS Versions
Unless you have the full source code version of Kentico CMS, you will need to parse the HeaderTags string in
\CMSPages\PortalTemplate.aspx.cs

Alternatively, you could move those stylesheets somewhere else and link them manually in a Master page.

User avatar
Member
Member
bryanallott - 8/5/2013 1:43:35 PM
   
RE:GetResource and CSS Versions
thank you. i'll take a look there. perfect!