Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Where is this HTML coming from? View modes: 
User avatar
Member
Member
john-wakefly - 9/15/2009 8:52:32 AM
   
Where is this HTML coming from?
At the end of the head tag (inside it), I have some CSS references, but I don't know where they live in the system. I've looked everywhere, and can't seem to find them! here is what it looks like

<head>
...
<link rel="shortcut icon" href="/favicon.ico" />
CSS STYLES
</head>

I am probably the one who put them there, but for the life of me, I can't remember where they are! Any ideas?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/15/2009 11:02:33 AM
   
RE:Where is this HTML coming from?
Hi,

In portal engine, are these tags generated on the master page, which is in CMSPages/PortalTemplate.aspx page. Here you can see that there is used a literal tag to insert some tags to the header section. Then in the code behind are added the tags dynamically and generating of these tags is leading to the source code.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
john-wakefly - 9/15/2009 1:36:35 PM
   
RE:Where is this HTML coming from?
OK, so the portal template has that placeholder literal, but what is telling it to generate those style tags???

User avatar
Member
Member
john-wakefly - 9/15/2009 1:40:40 PM
   
RE:Where is this HTML coming from?
The site root has nothing in the header text area on the master page... any other places it could be added?

User avatar
Member
Member
john-wakefly - 9/15/2009 2:02:23 PM
   
RE:Where is this HTML coming from?
Also in

Site Manager -> Development -> CSS Stylesheets

there are those stylesheets. But the other stylesheets I'm referring to are in addition to the Site Manager ones.

Anyone else know where those style tags can come from?

What parts of the application inject information into that literal tag inside the head tag in the portal template?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/15/2009 2:50:16 PM
   
RE:Where is this HTML coming from?
Hi,

I am sorry but I think that I got lost. Could you please explain your need with more details? Thank you.

The tags added to the head are generated using

this.ltlTags.Text = this.HeaderTags;

where HeaderTags are defined in UIControls.ContentPage.cs file and the tags are being added in DocumentBase.cs file, which is also in UIControls assembly.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
john-wakefly - 9/15/2009 3:28:33 PM
   
RE:Where is this HTML coming from?
So...

My homepage source looks something like this:

<head>
...
<link rel="shortcut icon" href="/favicon.ico" />
<link href="css/1.css" type="text/css" rel="stylesheet" />
<link href="css/2.css" type="text/css" rel="stylesheet" />
<link href="css/3.css" type="text/css" rel="stylesheet" />
</head>



Somewhere in Kentico, I must have add those style tags. As far as I can tell, they are not hard coded inside any file.

The portal template looks like this:

<head id="Head1" runat="server" enableviewstate="false">
...
<asp:literal runat="server" id="ltlTags" enableviewstate="false" />
</head>


So, the "ltlTags" Literal tag is being replaced with those styles. Where do those styles come from?

They have to be in the database/interface somewhere right????

In the CMS desk, I have checked the page tab, the design tab, master tab, and all of the property tabs. I also checked all of the pages in the Site Manager.

User avatar
Member
Member
john-wakefly - 9/16/2009 8:43:00 AM
   
RE:Where is this HTML coming from?
Anybody? Anyone add HTML like this to their head tag, and know where it is specified?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/17/2009 6:18:27 AM
   
RE:Where is this HTML coming from?
Hi,

Isn't it possible that you have added some stylesheets to the App_Themes folder with the same name as the CSS style sheet's code name, which is used on the site?

If there is a stylesheet in App_Themes folder with the same name as the name of the style sheet used on the site, .Net is automatically adding the styles to the header. I hope it will help.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ryan.wheale-gmail - 9/18/2009 7:23:54 PM
   
RE:Where is this HTML coming from?
Option 1: On the root node of your site in the CMSDesk, click on the Master Page tab and make sure you didn't put it in there.

Option 2: Look in your App_Themes folders like Juraj suggested. Any css files located in the in the theme folder for your site (App_Themes/Theme Name) will automatically be included on all of your pages using that Theme.

~Ryan

User avatar
Member
Member
john-wakefly - 9/21/2009 7:57:41 AM
   
RE:Where is this HTML coming from?
Thank you Jurajo and Ryan.

The issue was the App_Themes folder! I had no idea that this was a "feature" of ASP .NET. I HATE auto-magic crap like this!

Thanks guys!