ASPX templates
Version 4.x > ASPX templates > adding code just before the <body> View modes: 
User avatar
Member
Member
michael.hargreaves-roymorgan - 2/21/2010 10:58:15 PM
   
adding code just before the <body>
I've been trying to add some code just after the <body> tag in the master page template.
I'm running into difficulties here as the CMS is spitting out a heap of code below the <body> that is not referenced in the master page template. It's throwing out a hidden form and some microsoft ajax .js files.

I can;t find where this code is in the CMS or where to change it.

I wasn't invloved in the original development so I'm just wandering around the system aimlessly at the moment trying to figure it out.

Any help would be much appriciated.

Thanks.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/1/2010 6:11:27 AM
   
RE:adding code just before the <body>
Hello,


we were communicating via e-mail, for other readers:


You may find the template for Portal engine pages in:

<web site folder>/CMSPages/PortalTemplate.aspx

However, note that there are standard parts of ASP.NET page. Our CMS is based on ASP.NET and some scripts, hidden fields and a form ensure the ASP.NET functionality.


Best regards,
Helena Grulichova

User avatar
Member
Member
michael.hargreaves-roymorgan - 3/3/2010 5:04:02 PM
   
RE:adding code just before the <body>
Hey Helena,

Thanks for all your help on this one via email.

I did find a work around to edit this via the 'master page interface' so I didnt have to edit any of the Kentico files. (We currently don't have all our source code and are a little hesitant to make changes to files right now)

So for others, if you get to the master page interface and see the input for the <body> tags attributes you can close this off with a > and the add your code to the input, remember to leave the trailing > of your code out because the system will dynamically insert one when the page is processed.

Not an elegant solution it feels a little hacky to me but it does the job.

User avatar
Member
Member
michael.hargreaves-roymorgan - 3/3/2010 5:04:48 PM
   
RE:adding code just before the <body>
and might be worth mentioning that we actually use the Portal engine and not ASPX templates...

sorry wrong forum for the thread...