How to put fields data in meta (title, desciption, keywords)

More
13 years 1 week ago #25816 by loicberder
Hello,
In an article i would like to use data from custom fields to be inserted in the meta title, description and keywords...

Can someone know in which file those lines are constructed ? and if i can modified this only for one category ?

thanks in advance

Loïc

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #25819 by kenmcd
.

Why not use the Metadata fields already in the Item parameters settings?

How would this be different?

.

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #25888 by loicberder
I am using a php script (and rss flux) in the article to show informations on the page
So on a page call "film of the week" you have the list and then if you select one film, you have the info for that film... and at that moment i would like to put in meta the specific info related to this film

i am searching where do i have to insert my data ...

Loïc

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #25890 by ggppdk
See our FAQ article on how to retrieve the data of item inside a variable e.g. $item


then you could use
$item->title // title
$item->metakey // meta keywords
$item->metadesc // meta description
// etc

and output them inside the META keywords or META description of your page


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #25901 by loicberder
thanks for that answer

maybe i didn't explain well
i would like to do the other way : from outside -> to the meta

In fact i would use info from outside (an xml flux) to put inside the meta of a flexicontent page...



loïc

Please Log in or Create an account to join the conversation.

More
13 years 1 week ago #25902 by ggppdk
This is a general Joomla Question:
you could use:
Code:
$document = & JFactory::getDocument(); $document->setMetadata('description', $item->metadesc . $extra_desc); $document->setMetadata('keywords', $item->metakey . $extra_keywords); $document->setMetaData('title', $item->title . $extra_title); $document->setMetaData('author', $item->author . $extra_author);

Please read joomla documentation
Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.331 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save