Hi!
In the field edit page, when you edit a file upload field, the info says:
"Directory path that will be appended to $config['uploads_url'] . No slash at the end. {$item_id} and {$item_alias} will be replaced."
This seems not to work:
/images/mydir/{$item_alias}
leads to creation of a directory named
/images/mydir/{$item_alias}
not to
/images/mydir/somealias
so it takes it literally, and does not replace the variable with its value.
Same when I omit the parenthesis.
Does anyone know how this is supposed to work?
Cheers,
Alex
SOLVED: Listit2: File Upload doesnt work with $item_alias
-
faglork
SOLVED: Listit2: File Upload doesnt work with $item_alias
Last edited by faglork on Tue Oct 15, 2013 11:48 pm, edited 1 time in total.
-
Stikki
Re: Listit2: File Upload doesnt work with $item_alias
Howdy,
I just tested this on my server and it seems to work fairly well.
My test case was: images/single_test/item{$item_id}
And there was no error, no problems occurred.
As far i can tell, there is nothing wrong with this field type.
I just tested this on my server and it seems to work fairly well.
My test case was: images/single_test/item{$item_id}
And there was no error, no problems occurred.
As far i can tell, there is nothing wrong with this field type.
-
Stikki
Re: Listit2: File Upload doesnt work with $item_alias
Oh, sorry, your correct.
Probably some translation or old version of lang file.
New info says: Directory path that will be appended to $config['uploads_url'] . No slash at the end. {$item_id} and {$field_id} will be replaced.
so {$item_alias} is not valid, that's why it's not transformed at all.
Probably some translation or old version of lang file.
New info says: Directory path that will be appended to $config['uploads_url'] . No slash at the end. {$item_id} and {$field_id} will be replaced.
so {$item_alias} is not valid, that's why it's not transformed at all.
-
faglork
Re: Listit2: File Upload doesnt work with $item_alias
Hmmm ... any idea why {$item_alias} is no longer supported?
It would be nice because managing files in directories named by numbers is much harder ... it would be easy if you just knew to which data set the directory belongs. As it is now, you have to switch permanently between Filemanager and Listit2 just to look up the IDs
Cheers,
Alex
It would be nice because managing files in directories named by numbers is much harder ... it would be easy if you just knew to which data set the directory belongs. As it is now, you have to switch permanently between Filemanager and Listit2 just to look up the IDs
Cheers,
Alex
-
Stikki
Re: Listit2: File Upload doesnt work with $item_alias
Because when i did this change, fielddef didn't have knowledge of alias directly.
Field has knowledge of complete item that it belongs now, but until i am happy with API shortcuts to gain certain values from item, i wont add this back.
How ever, open FR to ListItExtended project and i'll look into this when i do some work with fielddef API next time i look into it.
If you need this feature right away, you may fork field type and make your own.
Field has knowledge of complete item that it belongs now, but until i am happy with API shortcuts to gain certain values from item, i wont add this back.
How ever, open FR to ListItExtended project and i'll look into this when i do some work with fielddef API next time i look into it.
If you need this feature right away, you may fork field type and make your own.
-
faglork
Re: Listit2: File Upload doesnt work with $item_alias
Thanks for clarification! I'll submit an FR.
BTW, Listit2 is a fantastic module. Congrats!
Cheers,
Alex
BTW, Listit2 is a fantastic module. Congrats!
Cheers,
Alex
