Topic Closed

How do I edit the head section of a page?

10 years ago#1278

483 Posts
1 Themes
1 Plugins

Hi ,  you can use these menus:

1) Admin - Configuration - General Settings ,

2) Admin - File Manager - <Page> - Rename/Details - More Options  or

3) edit file manually in any text editor and add to the page your own php command that will do it, for example this:

<?php global $page; $page->head = '<link rel="stylesheet" type="text/css" href="newcss.css" />'; ?>

but after that you cant use ckEditor, because it strips it away.

I dunno, if this can be currently done also in some another way...


Edited: 10 years ago#1279

Charles S
448 Posts
2 Themes
8 Plugins

Stano covers the basic ways to edit the meta information that will be in the <head> of your pages.

In general there really is no way to edit the head information without editing the theme template.php file directly or making a gadget. Currently even a gadget has limitations. They will be solved shortley as Josh is working on it now, I think.

The other way to make it easier to add information into the head is to design the template in such a way that </head> is within the editable page. This requires a few hacks to CKEditor and some finesse with your theme. If those concepts sound difficult then leave it alone and learn to work with gpEasy the way it is. 

Why do you need ot modify the head? What do you want to add?

10 years ago#1280

Thanks for the help!

I'm trying to add an RSS feed display on my home page. It's javascript from dynamicdrive, and part of it needs to be in the <head> section of the page.

I think I'll try your suggestions and experiment a bit. Thanks again for the tips!

10 years ago#1282

Charles S
448 Posts
2 Themes
8 Plugins

If it's JavaScript you probably don't have to have it in the head section even though the directions may state that.

Of course you can add it with the jQuery get script or append:

$('head').append('<link rel="stylesheet" href="/data/_addoncode/vTip_Black/style.css" type="text/css" />');


Those are example from my vTip plugin. Though that's not what I actually used, because mine needed to be loaded via php for certain reasons. If you only need to load a JS script in gpEasy you can just add it to the page you want via source view in CKEditor, within the theme itself if its going to be on every page, or make a gadget to add on a per layout basis.

By and large JavaScript can be added to any editable area in gpEasy.

10 years ago#1287

Topic Closed



elFinder 2.1.50 in Upcoming Release

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In