Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Convert
Wordpress to Elxis
with
Elxis importer
!
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Where is the core file that has $eDoc->showHead();
« previous
next »
Print
Pages: [
1
]
Author
Topic: Where is the core file that has $eDoc->showHead(); (Read 4552 times)
striker
Newbie
Posts: 39
Where is the core file that has $eDoc->showHead();
«
on:
June 23, 2016, 13:00:10 »
Hi Datahell and Elxis Dev Team,
Can you please direct me where exactly is this function located, $eDoc->showHead(); ?
I know that it generates the meta tags, links, etc. but I just want to add something in that function.
I tried searching it from the com_content files but failed to fine the exact location.
Thanks,
Logged
evkarab
Full Member
Posts: 232
Re: Where is the core file that has $eDoc->showHead();
«
Reply #1 on:
June 23, 2016, 16:09:38 »
I am an amateur and may be wrong but I think this is the file you are looking for : includes/libraries/elxis/document.class.php
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Where is the core file that has $eDoc->showHead();
«
Reply #2 on:
June 23, 2016, 19:36:58 »
Yes, it is the document.class.php file.
You don't have to modify that function
. The function displays what it is required by the running extensions to be displayed. If you remove something then something might broke and you will face errors. If you want to add something to the output you can use in any extension (template, module, component, etc) any of the add* functions of the document library (
addStyle, addStyleLink, addScript, addScriptLink, addLibrary, addJQuery, addDocReady, addCustom, addLink
). Especially with the addCustom method you can add ANYTHING to the document's head section.
$eDoc->addCustom('<test>Wow, I can add anything in head!</test>');
elxisDocument documentation
«
Last Edit: June 23, 2016, 19:39:27 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
striker
Newbie
Posts: 39
Re: Where is the core file that has $eDoc->showHead();
«
Reply #3 on:
June 24, 2016, 12:58:41 »
Hi datahell,
I always read the documentation before posting here in the forum but I'm just quite puzzled why this line won't work if I insert it on my template's head section?
$eDoc->addCustom('<meta property="og:image" content="'.$elxis->secureBase().'/'.$row->image.'"/>');
The
$row->image
piece isn't rendering the image URL.
GOALs:
1. I want to add og tags manually without the use of any plugin.
2. would only render og tags in articles or posts (not in category or other locations)
«
Last Edit: June 24, 2016, 13:00:47 by striker
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Where is the core file that has $eDoc->showHead();
«
Reply #4 on:
June 25, 2016, 07:47:12 »
$row->image is wrong, does not exist. Use the functions before you display the head in template index.php file.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Where is the core file that has $eDoc->showHead();