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
»
Elxis 4.x/5.x DEV
»
Robots Follow, Index or...
« previous
next »
Print
Pages: [
1
]
Author
Topic: Robots Follow, Index or... (Read 4661 times)
Luca
Full Member
Posts: 126
Robots Follow, Index or...
«
on:
February 10, 2013, 17:12:36 »
Once again compliments for this Great new CMS, I am really impressed about it!
Anyway, wouldn't be interesting also having included in the Article/Page Parameters the option for robots to index/noindex/follow/nofollow (or combination of them)?
Just only my 1 cent...
Thank you,
Luca
«
Last Edit: February 10, 2013, 17:14:21 by Luca
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Robots Follow, Index or...
«
Reply #1 on:
February 10, 2013, 23:06:56 »
Elxis puts noindex/nofollow automatically to pages they should not be indexed. All the rest pages should be indexed, so why to put such an option?
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Luca
Full Member
Posts: 126
Re: Robots Follow, Index or...
«
Reply #2 on:
February 11, 2013, 00:29:49 »
@Datahell
Thank you for the answer.
Yes.
i.e.
- in a contact page or in a long list of links I would set noindex/follow (ex., in another site (classifieds) I have set this in a page of 1000+ links to cities... ;
- in a "we are listed on..." page I would set noindex/nofollow or even index/nofollow...
and so on, depending on the use one would like to do..
IMO, would not be a wrong tool to have...
Luca
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Robots Follow, Index or...
«
Reply #3 on:
February 11, 2013, 13:12:41 »
In Elxis 4.x you can set
robots META tag
by using the
setMetaTag
method of the
elxisDocument
library.
Example of setting robots to
noindex, follow
:
eFactory::getDocument()->setMetaTag('robots', 'noindex, follow', false);
One more tip
If you want to set these custom meta tags only on some articles you can put a check for the
ELXIS_ARTID
constant (article's id) inside your template's index.php file.
Example
if (defined('ELXIS_ARTID') && (ELXIS_ARTID == 3)) {
eFactory::getDocument()->setMetaTag('robots', 'noindex, follow', false);
}
Example for multiple articles
if (defined('ELXIS_ARTID') && in_array(ELXIS_ARTID, array(3, 12, 7, 45, 28))) {
eFactory::getDocument()->setMetaTag('robots', 'noindex, follow', false);
}
Note
In cases where a library is being used more than one time dont use the chained method but use it like that:
$eDoc = eFactory::getDocument();
$eDoc->setMetaTag(...);
$eDoc->setTitle(...);
$eDoc->addStyleLink(...);
«
Last Edit: February 11, 2013, 18:51:34 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Luca
Full Member
Posts: 126
Re: Robots Follow, Index or...
«
Reply #4 on:
February 11, 2013, 14:18:38 »
@Datahell
Thank you!
luca
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Robots Follow, Index or...
«
Reply #5 on:
February 11, 2013, 18:45:53 »
A correction to me: The name of the Elxis constant that contains the current article's id is
ELXIS_ARTID
and not
ARTID
.
«
Last Edit: February 11, 2013, 18:52:59 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Robots Follow, Index or...