XF 2.2 How call an specific custom field resource?.. i have the code but.

dondomainer

Active member
I know this is the code for custom field resource

<xf:macro template="custom_fields_macros" name="custom_fields_view"
arg-type="resources"
arg-group="above_info"
arg-onlyInclude="{$category.field_cache}"
arg-set="{$resource.custom_fields}"
arg-wrapperClass="resourceBody-fields resourceBody-fields--before" />


and i try every what is said in other threads.

... name="custom_fields_view.NAME" <-- No work

... name="custom_fields_view_NAME" <-- No work

... name="custom_fields_NAME" <-- No work

... name="NAME" <-- No work

...custom_fields_view.getFormattedValue('NAME')

how can I do it?
 
Dump the vars in the widget to see what's available in what format.

Just add this to the widget template field: {{ dump(vars()) }} .
 
i jus try to add an specific custom resource field into widget area (same page)
Which page should it be? There're only two positions in two views for XFRM widgets. Maybe you have to create a TMS with own code.

The custom resource field can you call with $resource.custom_fields.NAME
 
Dump the vars in the widget to see what's available in what format.

Just add this to the widget template field: {{ dump(vars()) }} .
ohh..I add the code, but it does not appear that variable.
Which page should it be? There're only two positions in two views for XFRM widgets. Maybe you have to create a TMS with own code.

The custom resource field can you call with $resource.custom_fields.NAME

lets try "

$resource.custom_fields.NAME

thanks
 
the place is xfrm_resource_view widget area. (right side)
In the template xfrm_resource_view is NO widget area. You have to place your code block manually, e.g. with TMS.

yes i add that "

$resource.custom_fields.NAME

not work
Try {{ dump($resource.custom_fields.NAME) }} and copy it directly after the title tags in the xfrm_resource_view template.

Bildschirmfoto 2021-06-17 um 17.44.49.webp

Bildschirmfoto 2021-06-17 um 17.43.05.png

Use your custom field id for the NAME var, e.g. example for me.

Bildschirmfoto 2021-06-17 um 17.43.49.png
 
In the template xfrm_resource_view is NO widget area. You have to place your code block manually, e.g. with TMS.


Try {{ dump($resource.custom_fields.NAME) }} and copy it directly after the title tags in the xfrm_resource_view template.

View attachment 253488

View attachment 253486

Use your custom field id for the NAME var, e.g. example for me.

View attachment 253487

i get this, this is the link place on the custom field. but sorry I'm still lost, what i do know whit that?
 

Attachments

  • Screenshot_11.webp
    Screenshot_11.webp
    5.3 KB · Views: 10
Top Bottom