[Plugins] Link content inside Flexicontent

More
14 years 2 months ago #3301 by ComposerRyan
yopyop001, thank you for the reply.

I don't think that plugin that displays content will be of much use simply because I want to display more than one content item from a category...like a category blog layout.

Also, when will we see the next version of Flexicontent and will I be able to upgrade my BETA5 version that I currently have? I really hope so. :)

Thanks again, and yes, your English was very good.

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

More
14 years 2 months ago #3528 by ComposerRyan
So far, the plugin is working great but it does have a problem with its URLS...please read:

This applies to the /plugins/flexicontent_fields/selectflexiitem_reverse.php file and the selectflexiitem.php file

The URLS do not display the article's alias in the URL...it grabs the URL like this somehow:

$link="<a href=\"".JRoute::_(FlexicontentHelperRoute::getItemRoute($result->value))."\" >";


Currently, it only displays the article number and leaves off the article's alias like this:

www.mysite.com/category/item/107


when I need it to look like this (notice the article's alias is on the end)

www.mysite.com/category/item/107-article-alias-here


...how would I put its alias on the end of it? I am very, very new to this coding stuff and would appreciate the help! :)

By the way: I used this new route.php file that Emmanuel provided here:
www.flexicontent.org/forum/index ... =viewtopic
Attachments:

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

More
14 years 2 months ago #3534 by yopyop001
Hi,

Yes, it was on the TODO list for next update.

I will update soon the plugin but for now you can modify the query on the DisplayFieldValue fonction :

In the select_flexiitem.php
Code:
$field_elements= 'SELECT DISTINCT i.id as value, i.title as text, i.catid as catid,' .' CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(\':\', i.id, i.alias) ELSE i.id END as itemslug' .' FROM #__content as i' .' LEFT JOIN #__flexicontent_fields_item_relations AS fi_rel ON i.id=fi_rel.value' .' LEFT JOIN #__flexicontent_cats_item_relations AS rel ON rel.itemid = i.id AND rel.catid=i.catid' .' WHERE fi_rel.field_id='.$field->id .' AND fi_rel.item_id='.$item->id .$orderby ;

and change the line
Code:
$link="<a href=\"".JRoute::_(FlexicontentHelperRoute::getItemRoute($result->value))."\" >";
By
Code:
$link="<a href=\"".JRoute::_(FlexicontentHelperRoute::getItemRoute($result->itemslug)) ."\" >";

For the select_flexiitem_reverse.php file, you have to adapt the query on the same way (add
Code:
.' CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(\':\', i.id, i.alias) ELSE i.id END as itemslug'
on the query and load result->itemslug to generate the link.

I hope it'll work.
Rgds

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

More
14 years 2 months ago #3640 by micker
la mega classss !
bravo

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
14 years 2 months ago #3683 by vlester
Excellent ! Just what I needed to show an author link.
Thanks a lot.

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

More
14 years 1 month ago #4756 by vlester
Hello,
I also noticed a problem with the sef url using this plugin (not the same problem than ComposerRyan: the alias of my articles display in a correct way):
I have created a category "Authors" to link authors to their articles with this plugin.
When I create a new author (new item with a type "author"), there is the name of a menu added in front of the url. Not always the same menu. Whatever, this menu is not at all related with this author and should'nt be here. And also, the url of the articles linked to an author changed in the same way.
For example what shoud be :
wwww.mysite.fr/category-authors/eric-gallo
is
wwww.mysite.fr/menu-that-shoudnt-be-here/categroy-authors/eric-gallo

I created a flexicontent menu on my front page linked to the category "authors" and it solved the problem: now my url become wwww.mysite.fr/menu-authors/category-authors/eric-gallo
But in the back-end, when I go to the component AceSEF/Sef Urls, there are now two sef url created (the one with the weird menu and the correct one) for each article created with this plugin activated.
I can delete them one by one or just let them be there I guess. I just wanted to notice you the problem.

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

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