2012-03-01, 00:56:57
Hello
I have encountered a problem that overgrow me as I'm not PHP programmer. I have a list of items created with Items Manager. To each item I have to add a gallery (I want to do it with i18n Gallery). I have created a template to display items from Items Manager and I want to add there a gallery to each item (galleries are created usual way). Unfortunatelly (% gallery %) in WYSIWYG field is not working, so the only solution is to add php code in template that displays item's details. Gallery plugin require that:
<?php get_i18n_gallery_header('gallery-name'); ?> in header and <?php get_i18n_gallery('gallery-name'); ?> in the body.
Problem is I can't add static name in the template as gallery for each item is different. So it would be the best so I could change 'gallery-name' to according name that would be taken from a variable taken from Items Manager. I have a text-field in Items Manager with gallery name for each item.
Question is: how can I replace 'gallery-name' in i18n Gallery code inside template with appropriate name taken from Items Manager text-field? I guess it requires some PHP trick, but my knowledge of PHP is just to know where to put something in my HTML code.
I have encountered a problem that overgrow me as I'm not PHP programmer. I have a list of items created with Items Manager. To each item I have to add a gallery (I want to do it with i18n Gallery). I have created a template to display items from Items Manager and I want to add there a gallery to each item (galleries are created usual way). Unfortunatelly (% gallery %) in WYSIWYG field is not working, so the only solution is to add php code in template that displays item's details. Gallery plugin require that:
<?php get_i18n_gallery_header('gallery-name'); ?> in header and <?php get_i18n_gallery('gallery-name'); ?> in the body.
Problem is I can't add static name in the template as gallery for each item is different. So it would be the best so I could change 'gallery-name' to according name that would be taken from a variable taken from Items Manager. I have a text-field in Items Manager with gallery name for each item.
Question is: how can I replace 'gallery-name' in i18n Gallery code inside template with appropriate name taken from Items Manager text-field? I guess it requires some PHP trick, but my knowledge of PHP is just to know where to put something in my HTML code.