Item title before category title with sh404sef?

More
12 years 3 months ago #21843 by ggppdk
Getting flexicontent field value to a custom CKform or RSform is a common request i am thinking of adding this to the new documentation of the site.

About what you ask, it sounds easy to me, can you past the code of the form (not ALL the form only the hidden field) and the code you use to add the item title to the field?

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.

More
12 years 3 months ago #21852 by victorio404
//<code>
$doc = & JFactory::getDocument();
return $doc->getTitle();
//</code>
this is the whole code of the hidden field(got it from RSform support: www.rsjoomla.com/support/documen ... title.html )
It was working ok with SOBI2 before.

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

More
12 years 3 months ago #21854 by ggppdk
aaa, i see that your code is inside RSFORM code !!!

So, your code is probably executed, before the FLEXIcontent code sets the page title, i guess the page title you get is the title of currently active menu item which points to a category.

USE this (WILL WORK only in flexicontent item view not in category view, so do not display the load module field in category view)
Code:
$db = & JFactory::getDBO(); $fcitem_id= JRequest::getInt('id',0); $fccat_id= JRequest::getInt('cid',0); $view= JRequest::getVar('view'); if ($view!='items' && $view!='article') { return "not in items view"; } if ($fcitem_id) { $query = 'SELECT c.* ' .'FROM #__content AS c ' .'WHERE c.id = ' . $fcitem_id; $db->setQuery($query); $itemdata = $db->loadObject(); $item_title = $itemdata->title; } if ($fccat_id) { $query = 'SELECT c.* ' .'FROM #__categories AS c ' .'WHERE c.id = ' . $fccat_id; $db->setQuery($query); $catdata = $db->loadObject(); $cat_title = $catdata->title; } return $item_title." - ".$cat_title;

in the above code if you only want item title then replace last line with:
return $item_title;

Also consider leaving review for FLEXIcontent in JED

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.

More
12 years 3 months ago #21859 by victorio404
Perfect solution as always, thank you! :) I can't believe FC a free component, absolutely awesome.
Did the review on JED BTW :)

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

More
12 years 1 month ago #23802 by Ardias3k
Where can I find the settings that is not in the post-view in the top row of the browser-category name will be displayed.

In the settings in Article I find that these settings are "Global" or on / off - can be switched. Where can I find this the global settings?

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

More
12 years 1 month ago #23803 by micker
hello we didn't do this plugin .. post on 404sef forum regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.297 seconds
Save
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