Item title before category title with sh404sef?

More
12 years 10 months ago #21797 by victorio404
Hi i'm using flexinontent r1057 with sh404sef. Everything is working great except the generated Titles are like this: "Category-name - Item-name | Site-name". Can't find a way to switch places like this: "Item-name - Category-name" even if i disable adding category and section in title from sh404sef configuration it is always Category-name - Item-name.
I assume the file "/components/com_flexicontent/sef_ext/com_flexicontent.php" have to be edited? Is there a way of changing that?

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

More
12 years 10 months ago #21807 by ggppdk
-- The setting of page_title is not related to sef component.

-- The setting of page_title is inside file
component/com_flexiconent/views/items/view.html.php
this file is not overridable

-- But you can copy code from the above file inside your template file:
component/com_flexiconent/templates/mytmpl/item.php
and change it e.g.
Code:
$cid = JRequest::getInt('cid', 0); //get item data $item = & $this->item; $params = & $this->params; $cats = new flexicontent_cats($cid); $parents = $cats->getParentlist(); $document = & JFactory::getDocument(); $menus = & JSite::getMenu(); $menu = $menus->getActive(); if ($params->get('override_title', 0)) { if ($params->get('custom_ititle', '')) { $params->set('page_title', $params->get('custom_ititle')); } else { $params->set('page_title', $item->title); } } else { // Get the menu item object if (is_object($menu)) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', $item->title); } } else { $params->set('page_title', $item->title); } } /* * Create the document title * * First is to check if we have a category id, if yes add it. * If we haven't one than we accessed this screen direct via the menu and don't add the parent category */ if($cid && $params->get('addcat_title', 1) && (count($parents)>0)) { $parentcat = array_pop($parents); $doc_title = $params->get( 'page_title' ) . (isset($parentcat->title) ? ' - '.$parentcat->title:""); } else { $doc_title = $params->get( 'page_title' ); } $document->setTitle($doc_title);

-- Effectively the above code sets the title again PLACING category name after item title.
if you need further change title then edit these are the final lines:
if () {
$doc_title = ...
} else {
$doc_title = ...
}

I hope this will be useful too many people, must remember to put it in the new upcoming FAQs

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 10 months ago #21808 by micker
i copy it ! lol

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.

More
12 years 10 months ago #21825 by victorio404
Thanks.
I did that and now the title is ok.
But in RSforms i'm using
//<code>
$doc = & JFactory::getDocument();
return $doc->getTitle();
//</code>
in hidden field in order to send item title(the form is inside the flexicontent item). In the received form instead of the item title is the category title. Do you know how to get the item title in Rsforms?

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

More
12 years 10 months ago #21837 by ggppdk
1. You mean you are displaying an item and you have Rforms module, and you need to automatically fill in some fields of the form?

If so you can do in 2 ways:
a. edit the template module if module has templates, retrieve item data and use them
-- OR what i do in my sites --
b. Use PHP and javascript inside FLEXIcontent item to populate RSforms fields with data


-- 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 10 months ago #21839 by victorio404
not module - the Rsform is inserted into flexicontent item via plugin. The field is hidden and it has to get the item title and send it on submission. The code i have works, but for some reason gets the category Title instead of Item title. I was hoping to resolve that by displaying Item title before category title, but i still get the category title in the e-mail.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.518 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