using related/backrelated item to create a related item list

More
12 years 10 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
12 years 10 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 review. Thanks!

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

More
12 years 10 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
12 years 10 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 review. Thanks!

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

More
12 years 10 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
12 years 10 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.

More
12 years 10 months ago #34056 by ggppdk
-- 1st problem is due to wrong code above which had an extra character,


please restore original file
, or try:
... = '';

AND NOT
.... = : '';

-- 2nd problem is not a bug it is normal , since you display the image HTML of the field, i think we need to add more display variables that link to the item
For now please use display_variable without popup

<img src=""{{fieldname##display_small_src}}"> BUT YOU need to hack code not to display label as described above
About link to item see parameters' poppup description on how to add a link

I will make this even more in future version, and removing the label altogether and allowing MANUAL ONLY insertion

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 review. Thanks!

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

More
12 years 10 months ago #34079 by rottenberg
Hello

I have corrected the display line in fields.php
the content now is the following :
Code:
//$custom_field_display = $_field ? '<b class="flexi label">'.$_field->label .'</b> : ' : ''; $custom_field_display = '';

I have replaced the the value to be displayed like this :
Code:
<img src="{{produit##display_large_src}}" width="150" height="200">
(I have taken the resized large image because in the context medium or small are to little to be seen).


I get the first image but not the 5 others links (there are 6 links). I get this :
Code:
<div class="flexi value field_produits_editeurs"><img src="http://bibliactiv.mishdanart.com/images/stories/flexicontent/item_115_field_43/l_couv-20-aout-55.jpg" width="150" height="200"><br /><img src="/" width="150" height="200"><br /><img src="/" width="150" height="200"><br /><img src="/" width="150" height="200"><br /><img src="/" width="150" height="200"><br /><img src="/" width="150" height="200"></div>


The main problem now is that I don't get the images after the first one and if possible not display the line feed < b / > between each image. I would prefer display each of them one next to the other with a css order.

best regards
Michel

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

More
12 years 10 months ago #34081 by rottenberg
I think I have found a clue for the images that are not displayed after the first one.

In the present case the link are from the publisher to each book that he publishes.

In the present case bibliactiv.mishdanart.com/index.php/fr/l...roduits-de-l-éditeur the images are in the books article in the field 'produit'.
Each book has only one image.

For another publisher I have more images for each book :
bibliactiv.mishdanart.com/index.php/fr/l...roduits-de-l-éditeur

the images displayed for each book are :
the 1st for the first book, the 2nd for the second book, the 3rd for the third book... and the first for the 4th book (that's strange for this book wich have 6 images).

I think about the non reinitialization of the image index for each book.

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

More
12 years 10 months ago #34084 by ggppdk
Thanks for report will fix this, temporarily do not use this new feature (field replacement) for image 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
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