I have a custom field in my News module called “Publication/medium”, and I want to display the value of this field in a custom location in my summary template, i. e. outside of the foreach loop in which the custom fields are usually retreived. How would I have to go about this?
I tried {$entry->fields.Publication/medium->value} as well as {$entry->fields.Publication/medium.value} but nothing is working.
How to retreive custom field values in News module directly?
Re: How to retreive custom field values in News module direc
http://forum.cmsmadesimple.org/viewtopi ... es+in+News
Search still works for me ...
BTW where does the / comes from?
Search still works for me ...
BTW where does the / comes from?
"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!
* 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!
Re: How to retreive custom field values in News module direc
A slash is not allowed inside var name.
Re: How to retreive custom field values in News module direc
The slash is part of the field name. There is only the option of giving the field a name (i. e. there is no alias field or whatever), and apparently it’s possible to put any character in the name field. So, how is the field retreived then if not by name? The characters are probably escaped somehow, no?
And by the way: how comes this thread is in the lounge? Has it been moved? Because I was sure I posted it in the Product Support forum.
I’m probably working way too much, I can’t even think straight anymore.
And by the way: how comes this thread is in the lounge? Has it been moved? Because I was sure I posted it in the Product Support forum.
I’m probably working way too much, I can’t even think straight anymore.
Re: How to retreive custom field values in News module direc
If the / is acceptable (which I'm not sure) this should work afaik:
Code: Select all
{$entry->fieldsbyname.Publication/medium->value}
"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!
* 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!
Re: How to retreive custom field values in News module direc
Smarty follows the php naming rules for variables
http://php.net/manual/en/language.variables.basics.php
As you can see slash is not allowed. A slash is reserved as separator between folders .
http://php.net/manual/en/language.variables.basics.php
As you can see slash is not allowed. A slash is reserved as separator between folders .
Re: How to retreive custom field values in News module direc
Most likely it was moved from product support because you were asking about a 'module' not the core, even if News comes pre-installed...
Re: How to retreive custom field values in News module direc
I moved the thread to Modules/Add-Ons board
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -