How to make a conditional button showing related items?

More
10 months 4 days ago #84049 by guitarman
Dear Flexicontent community

I'm using Flexicontent for a very short period of time (2 days) and I'm testing it extensively in order to use it as future content construction kit to create apps for my customers. 
So, please excuse this very basic question.

I try to figure out how to...
... display a button in item view, but only when there is another item pertaining to the same category/brand.


By clicking the button, the related items should be displaying directly, without having to navigate back to the category/initial view. 
When there are no related items, the button shouldn't be visible.

I found a possibility using the related items list... but that's not what I've been looking for. 

How can the following be achieved?
- automatically search for/detect items with the same brand (without having to relate the items manually)
- conditional display of the button, if there are items with the same brand present
- automatic adaption of the button text to the respective brand name

Thank you very much in advance for every hint pointing me towards a solution to this!

Best regards,

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

More
10 months 4 days ago #84050 by guitarman
Example of a live-app I wrote, where this works (using another CCK):  autozeit.ch/oldtimer-markt
When you open a car brand that has multiple entries (i.e.  autozeit.ch/oldtimer-markt/bentley-brooklands-limousine ) the button to display cars from the same brand shows up below the entry. 

When there are no cars of the same brand, the button doesn't show up.
Attachments:

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

More
10 months 3 days ago #84052 by micker
hello
happy for a new customer
a question what is this button ? a link to where ?
what is the relation between article ? same item in category, same tag, same value in field ?

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]
The following user(s) said Thank You: guitarman

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

More
10 months 3 days ago #84053 by guitarman
I could achieve this using the core categories field. 
As this is not displaying as "button" in the frontend, I changed it's look using ReReplacer, to avoid the change of core-field files.

It works: If there are other items using the same brand-category, the button shows up, if not, it doesn't.
Attachments:

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

More
10 months 3 days ago #84054 by guitarman
Thank you very much for pointing me in the right direction. It is basically checking if there are other items in the same category.

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

More
10 months 3 days ago #84055 by micker
not sure you can acheive this without coding php in your template item
is it a custom link (for your button) ?
maybe a trick by using an universal module, here the concept :
- if a flexicontent module is empty its not displayed
- in flexicontent module you can add a custom readmore
- you can list item in current categorie
=> display this module if it found item in same category and that display the custom button
after hide item list via a css display:none ....
its a proof need to be tested

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.279 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