GetSimple Support Forum

Full Version: Insert I18N-Gallery into a Custom Field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi together,

I tried to put an I18N-Gallery into a Custom Field. It is a WYSIWYG-Field.

If I put the "(% gallery name=wohnung-1 %)" into the Editor, but the Gallery will not be shown in the Frontend. Instead I will see on my Site only the repeating of "(% gallery name=my-gallery-name %)".

Here you find a screenshot:

[attachment=583]


I think I`m doing something wrong, but what?

Peter
The (% tag %) syntax is pre-processed by content filters and only works in the standard content field (unless a plugin developer implemented it specifically in his plugin). You probably also can't write the PHP tag because it will be HTML-encoded.
So I think the best thing to do is, in your template/ component, do something like: 

PHP Code:
<?php get_i18n_gallery(return_custom_field('your-field')); ?>

And just enter the gallery name as the value for a regular text type custom field.
If you use a component you need the dynpages plugin.
You can also use I18N Special Pages instead. Then you can specify the PHP code in the view setup of the special page type.