Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Add to the head section of a portal page View modes: 
User avatar
Member
Member
positivepurchasing - 1/31/2013 4:50:13 AM
   
Add to the head section of a portal page
Hi,

I desperately need to know how to add to the head section of the portal page.

Cheers
Paul.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/31/2013 4:58:39 AM
   
RE:Add to the head section of a portal page
Hi Paul,

where exactly is the problem? You can easily modify the <HEAD> section through the Master Page: Editing the master page - HEAD section.

Best regards,
Martin Danko

User avatar
Member
Member
positivepurchasing - 1/31/2013 5:05:52 AM
   
RE:Add to the head section of a portal page
Hi Martin,

Thanks that works, fine. That leaves 2 questions.

1, Where do urls like - '="/CMSPages/GetResource.ashx?scriptfile=%7e%2fCMSScripts%2fjquery%2fjquery-core.js' come from, I don't know how I get a url like this?

2, What does the 'Header' tab do in the page template edit section in site manger?

Cheers
Paul.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/31/2013 5:33:39 AM
   
RE:Add to the head section of a portal page
Hi Paul,

1. The URL is generated in that format because of minification and the URL handling, it resolved macros, etc.

2. You can find more details in the Developers Guide: Managing the page template catalog.
Genereally... it can be useful if you need to link some additional CSS or JavaScript files for a specific page templates but not on all pages, so you don't want to add them directly to the Master Page.

Best regards,
Martin Danko

User avatar
Member
Member
positivepurchasing - 1/31/2013 10:09:04 AM
   
RE:Add to the head section of a portal page
Hi,

So much time wasted again on basics. I thought CMS were supposed to be helpful.

How do I reference a js file in the portal engine system? This is so frustrating when I'm only trying to do something simple.

Can please tell me something about 'GetResource'. It's just Kentico I'm struggling with!

Cheers
Paul.

User avatar
Kentico Customer Success
Kentico Customer Success
Accepted solutionAccepted solution
kentico_martind2 - 2/1/2013 6:18:14 AM
   
RE:Add to the head section of a portal page
Hi Paul,

I'm very sorry to hear that but I'm really not pretty sure where is the problem. How are you trying to insert a JS into your page?

Maybe the easiest way for you will be using the JavaScript Web Part: Javascript Overview.

In other case I really don't see a problem placing the JavaScript directly into the master page HEAD section, .e.g.
<script src="http://your_site/CMSScripts/custom_script.js" type="text/javascript" ></script>

as showed in the screenshot in the Developers Guide.

Best regards,
Martin Danko

User avatar
Certified Developer 11
Certified Developer 11
jfowler - 6/7/2013 2:42:55 PM
   
RE:Add to the head section of a portal page
Hi Martin,

I have a question that is similar to the original poster's question.I would like to add Open Graph protocol tags to particular pages on a Portal Engine site.

In the design view I'm able to add the "Head HTML code" web part but adding information to that web part would adding the information on the template level and not the page level. Most of the pages on the site share the same template.

Is there a way to add information to the <head> on a page level int he Portal Engine?

Thanks for any help you can provide,

Jason

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 6/11/2013 3:40:04 AM
   
RE:Add to the head section of a portal page
Hi Jason,

Yes, the Web part applies to all pages that use the same page template. For this purpose you will need to use the Widget instead of Web Part. Widget is personalized just for the specific page.

Best regards,
Martin Danko

User avatar
Certified Developer 11
Certified Developer 11
jfowler - 6/12/2013 9:26:22 AM
   
RE:Add to the head section of a portal page
Hi Martin,

I've done a browse around the widgets in the version that our client is using. I can't seem to find a widget which would be the equivalent of the head modifying web part.

Is the head modifying widget only available in the Ultimate or EMS version of Kentico? Or perhaps is this widget something which has to be custom developed?

Thanks for your help,

Jason

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 6/14/2013 10:03:40 AM
   
RE:Add to the head section of a portal page
Hello Jason,

No there is only Web Part available but Widget is always based on the Web Part so you will just need to create a Widget from this Web Part as is described also in the Developers Guide. Just give it a try, it's simple.

Best regards,
Martin Danko

User avatar
Certified Developer 11
Certified Developer 11
jfowler - 6/14/2013 10:09:19 AM
   
RE:Add to the head section of a portal page
Great, thanks for your help Martin.