Button in category item view

More
1 year 3 months ago #1 by ANT
Button in category item view was created by ANT
Hellon

i am searching for hours in the documentation 
I have to add buttons in a content category blog view ( or list ? )
I want the user to add favorites from there to create a pdf.
Where can I find a tutorial ?

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

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
1 year 3 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic Button in category item view
Hello ANT and thank you for posting!
I'm sorry that you are looking for this for hours.

MyShortlist buttons are primarily intended to add the main item of the current page in favorites.
Since some people want categories to be added in their favorites, too, we need to specify a way for MyShortlist to know that you want to add Joomla articles, not Joomla categories.
In order to do that, you can write {msl_button aid="1"} anywhere in your content. The number 1 stands for the ID of the Joomla article you want to add.
You can include that anywhere in Joomla, and it will always add Joomla article with ID 1 in your favorites.

This is described in MyShortlist's FAQ , Advanced Configuration, question 4.

In order to automate the inclusion of this button in your category, you can create a template override of the file components/com_content/tmpl/category/blog_item.php and write {msl_button aid="<?php print $this->item->id; ?>"} where you want the button to be placed.

Let me know if you need any further assistance.
Thanks again!

Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!

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

More
1 year 3 months ago #3 by ANT
Replied by ANT on topic Button in category item view
Well, It works
I thought I had to use custom blocks
Your tutorial does not mention automate things, as your demo does, I think it should do.
Thanks again

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

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
1 year 3 months ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic Button in category item view
Hi ANT,

I'm glad it works.
Custom Blocks are only required if you want to add indefinite parts of your website in your list, like a custom piece of HTML, or images from a gallery that is otherwise not specified in the database.
The wording to better explain this functionality eludes me.

Let me know if you need any further assistance.
Thanks again!

Christopher Mavros
me@mavxr.com
If you like our extensions, please rate us on the JED!

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

Moderators: Christopher Mavros