Lise add custom field value to url template or alias template

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
pierrepercee
Forum Members
Forum Members
Posts: 153
Joined: Thu Jan 10, 2013 8:02 am

Lise add custom field value to url template or alias template

Post by pierrepercee »

Hello,

I know smarty tag references ({Prefix} {ItemTitle} etc...) for generate url template or alias template. I would like to use the value from a particular custom field. It doesn't work with

Code: Select all

{$item->fielddefs.myfield->value}

adding to URL template in options tab

But I can add for example

Code: Select all

{microtime(true)} or {smarty.now}
Is there a way to add the value from a custom field ?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1932
Joined: Mon Jan 29, 2007 4:47 pm

Re: Lise add custom field value to url template or alias template

Post by Jo Morg »

Not an easy feature to implement: as a custom field doesn't have a value until it is filled (whether it has been saved or not), the task has to be done via javascript, browser side, and AJAX, with all the implications it may have. I believe it can be implemented, but I'd have to play with the idea a bit to see if its feasible. I have a huge backlog of work already so that will probably have to wait till LISE 2.0 or so...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3491
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Lise add custom field value to url template or alias template

Post by velden »

Wouldn't it be possible to do it using some UDT logic and an event?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1932
Joined: Mon Jan 29, 2007 4:47 pm

Re: Lise add custom field value to url template or alias template

Post by Jo Morg »

@velden, you could eventually be able to pull that one off with some sort of placeholders in the template that could then be replaced in the save event via an UDT. It would probably have to be something along the lines [placehloder1]/[placehloder2].... etc and then on the UDT make the replacements, but yes, something like that would be possible indeed
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
pierrepercee
Forum Members
Forum Members
Posts: 153
Joined: Thu Jan 10, 2013 8:02 am

Re: Lise add custom field value to url template or alias template

Post by pierrepercee »

Thanks Jo Morg,

I had the same idea as Velden. I will wait until Lise 2.0. It's not urgent.
Post Reply

Return to “Modules/Add-Ons”