Skip to content

Make fields from new Global Options available in header twig template #475

Answered by timohubois
Iain-g asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Iain-g the default approach is using the renderComponent twig function. What do you mean with header twig template and what exactly do you want to to do?

If you want to render the component SocialLinks with twig you can add {{ renderComponent("SocialLinks") }} into any .twig file.

If you want create fields which should be available for multiple components without any layout logic you can take a look on the sliderOptions.php inside the inc folder. Which will then added to the component SliderImages inside its functions.php.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Iain-g
Comment options

Answer selected by Iain-g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants