How to display a field in a module template?

More
3 years 10 months ago #78600 by grabit
Hello I tried your suggestion but it stays empty!

If I put the field in the customs fields part of the layout, I see the value so I am sure that the value exist.

I also use the pro plug-in and hen I created a similar version with substitution and it works.

Code:
<?php echo '<a class="uk-cover-container uk-transition-toggle uk-display-block uk-link-reset" tabindex="0" href="{flexi_field:130 item:'.$item->id.' method:display}">'; ?>

But I prefer to stay with a non pro version.

An Apple a days keeps the doctor away

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

More
3 years 10 months ago - 3 years 10 months ago #78608 by ggppdk
Hello

so what is the output of the 2 code cases that i gave you above ?
(Also temporarily enable Joomla Debug to see if we get some non-set variable warnings)


add this to your template to make sure that the field has values
Code:
print_r($item->fieldvalues[57]);

replace 57 with your field id
- does it show any values ?

Also test this
Code:
print_r($item->fields['slideshow-link']->label);

- does it show field label ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 3 years 10 months ago by ggppdk.

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

More
3 years 10 months ago #78616 by grabit
It doesn't output anything but if I put the field in the custom fields, there is an output so I am sure the field is not empty.

If I use the pro feature "content replacement" it works. Where is my mistake?

An Apple a days keeps the doctor away

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

More
3 years 10 months ago #78633 by ggppdk
Hello

this is strange !
Code:
$item->fieldvalues[NNN]

is always populated, regardless of creating field's display

i would like access to check this


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
3 years 10 months ago - 3 years 10 months ago #78644 by ggppdk
Hello

i forgot the title of this topic

yes in universal module
the field values are not passed to the layout unless you add it to the custom field parameter


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 3 years 10 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.304 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline