ListitExtended, call from a link

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

ListitExtended, call from a link

Post by erpee »

The following tag displays my category

Code: Select all

{ListIt2MyMod category="A2"}
But I want a way to create page where the category is loaded after a link has been clicked like:

Code: Select all

<a href="{ListIt2MyMod category="A2"}">Load Category A2</a>
This one doesn't work but it states nicely what I want.

Is there a way to realise this?
Last edited by erpee on Tue Dec 17, 2013 3:47 pm, edited 3 times in total.
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListitExtended, call from a link

Post by velden »

Quick tip (I got from Stikki): have a look at the urls that are created when you enable pagination for that view/module.

Did not yet use it myself though. Still interested if you find another way.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: ListitExtended, call from a link

Post by calguy1000 »

Use CGSimpleSmarty

{module_action_link module='Listit2MyMod' category='a2' text='This is your link'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

Re: ListitExtended, call from a link

Post by erpee »

Thanks Calguy, works like a charm!
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

Re: ListitExtended, call from a link

Post by erpee »

calguy1000 wrote:Use CGSimpleSmarty

{module_action_link module='Listit2MyMod' category='a2' text='This is your link'}
Is there also a way to use an Image instead of "this is your link"?

e.g.

Code: Select all

{module_action_link module='Listit2MyMod' category='a2' image='uploads/image.png'}
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListitExtended, call from a link

Post by velden »

From the help:
{module_action_link}

A smarty plugin that can create a link to a module action.

Arguments:

module - The module to create a link to
action (default) - The action to call within the module
text - The text to put in the link
page - Specify the destination page
urlonly - Instead of generating a link, generate just the url
jsfriendly - Used with the urlonly parameter this parameter will ensure that a javascrpt friendly url is output.
confmessage - A confirmation message to display when the link is clicked.
image - An image to use on the link
imageonly - If an image is specified, create a link only consisting of the image. The text will be used for the title attribute


Any other arguments to the smarty plugin will be added to the URL generated.
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

Re: ListitExtended, call from a link

Post by erpee »

Still not working. I've tried this:

Code: Select all

{module_action_link module='Listit2MyMod' category='a2' imageonly='uploads/image.png' text='This is your link'}
Am I doing something wrong?
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListitExtended, call from a link

Post by velden »

imageonly - If an image is specified
So use at least the 'image' parameter too.
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

Re: ListitExtended, call from a link

Post by erpee »

I'm confused ... I can't get it to work ...

How should I edit the code?
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: ListitExtended, call from a link

Post by velden »

not sure but I guess:

Code: Select all

{module_action_link module='Listit2MyMod' category='a2' image='uploads/image.png' imageonly=1 text='This is your link'}
or alternative:

Code: Select all

<a href="{module_action_link module='Listit2MyMod' category='a2' urlonly=1 }"><img src="{uploads_url}/image.png" alt="" /></a>
ps. I prefer using {uploads_url} in stead of 'uploads'
User avatar
erpee
Power Poster
Power Poster
Posts: 771
Joined: Sat Jul 07, 2007 9:22 am

Re: ListitExtended, call from a link

Post by erpee »

velden wrote:

Code: Select all

<a href="{module_action_link module='Listit2MyMod' category='a2' urlonly=1 }"><img src="{uploads_url}/image.png" alt="" /></a>
ps. I prefer using {uploads_url} in stead of 'uploads'
This code did it for me ... Thanks
Waarom zou het direct goed moeten gaan? Dan is alle lol weg ...
chandra

Re: ListitExtended, call from a link

Post by chandra »

calguy1000 wrote:Use CGSimpleSmarty

{module_action_link module='Listit2MyMod' category='a2' text='This is your link'}
Made my day - thanx.

Cant find it in module help how to add module related parameters ...
Post Reply

Return to “Modules/Add-Ons”