using related/backrelated item to create a related item list

More
11 years 8 months ago #34016 by rottenberg
Hello
I need some additionnal explanation about related items.
I'm using v2.0 1648 and Joomla 2.5.

The site is a library.

I have 2 types or articles :
- Books
- Publishers

The book's articles contains a link to the publisher's article who has published the book.

In the front-end book article I display the publisher names (which is the title of the publisher's article)

In the front-end publishers article I display the list of all books published by him. I show the title of the books which are the title articles.
[attachment=0:3oq4eg53]<!-- ia0 -->page_editeur.jpg<!-- ia0 -->[/attachment:3oq4eg53]

Eache title is an hyperlink which opens the corresponding book's page.

I use this without any problem in the RC9b 1601.

Now with the new version I'd want to replace to name of the books by there corresponding cover.

The cover is an image/gallery field (called produit) which may contain more than one image. The cover is always the first image of the field.

Is it possible to do that ?


I have also a connected question about this problem :
I want to add in my category page a search item to get only the books of a publisher. I don't see the search field in the field description form.
Is it possible to have a related item as search item ?


thank you for help
best regards

Michel

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

More
11 years 8 months ago #34019 by ggppdk
Make sure you have r1648,

Check descriptions of the new parameters of 'relation' and 'relation reverse' field, it is now possible to list related items with custom HTML that contains any of the item fields, e.g. image , title without link or with link etc

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
11 years 8 months ago #34023 by victorio404
That is a great feature.
Can we get more detailed guide of how to format the fields?
For example i want to display fields with no field title, can we control that in relation field parameters?
If i display image field inside - how to set which size to display? With {{fieldname}} it is displaying the large thumbnail and i want to display medium - what is the displayvar for that?

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

More
11 years 8 months ago #34025 by ggppdk
Yes it cleared stated in the description
you can use (inside the HTML parameter) fields like
{{fieldname}}
OR
{{fieldname##displayvar}}

e.g. image field (see our FAQ article) has:
(Display Variables having HTML)

display
display_small
display_medium
display_large
display_original

About label we will add something to control label

To temporarily disable the label, hack this line
Change this line (in component_frontend/classes/flexicontent.fields.php)
Code:
$custom_field_display = $_field ? '<b class="flexi label">'.$_field->label .'</b> : ' : '';
To
Code:
$custom_field_display = '';

This is only temporary solution as we will add ability not to display label, AND also add some CSS clases

e.g. like this
{{fieldname##displayvar##nolabel}}}


-- 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
11 years 8 months ago #34034 by rottenberg
I have tested with the 1648 after having modified the fields.php to avoid the label.

1st problem : I get only the first link. ( in the example givien at the beginning I have 6 books).Now I get the image of the first book and only ":"(the label) for the others.

2nd problem : In the old presentation, the link redirect to the book page. Here the link open the large size popup image. Of course I need the book page.

Here an exemple of both versions :

the old one rc1601 :
www.bibliactiv.com/index.php/fr/livres-e...roduits-de-l-éditeur

the new one FC2 1648 :
bibliactiv.mishdanart.com/index.php/fr/l...roduits-de-l-éditeur

[attachment=0:3ehyw8gn]<!-- ia0 -->related_item.jpg<!-- ia0 -->[/attachment:3ehyw8gn]

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

More
11 years 8 months ago #34035 by victorio404
Thanks for the tip!
Can i make the image field to be linked to the item too with a second variable? {{image_field##display_medium##link}} is not working.

The temporary hack is making server error, but thanks to the suggestion i've managed to hide the field title trough css "display:none;"

PS. Just noticed - on multiple related items - only the first item's image is being displayed - multiple times.

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

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