187 Posts
Pathos
11 years ago
3
Topic

Hello,

i was thinking about adding some code before the text of a field and after the content of a field...

Does someone know if this is possible with the The Code Before Store plugin?

I want to add some 'code' like this {lang=nl-NL} before the content of a wysiwyg-field and after the content {/lang}


This is how it needs to be stored...

Is this something you can do with the plugin (two types of code on a specific place)? Or is it even possible to create some php-code to achieve this?


Thanks in advance.

Greetings Joris

Get a Book for SEBLOD
175 Posts
webcastor
11 years ago
0
Level 1

I find your idea quite interesting, with just one caveat. Actually, if you "render" the aggregated content into a text field, you will not be able to edit it as separate languages later. What I was experimenting is placing the Freetext placeholders for {lang=xx-XX} and {/lang} in intro and full view, before the language specific text.

Also, it occurred to me that maybe it's even simpler to use typography (#3) > HTML and place {lang=xx-XX} *value* {/lang}

187 Posts
Pathos
11 years ago
1
Level 1

Thanks Webcastor,

it seems to work... in my searchlist it only shows the correct language-description of a product. The only thing i need to change is that it puts a lot of /// in de 'header' of the list collum. I used your trick for the labels as well... and because in that collum it shows the description/labels seperated by / it shows //description/// were / is one language-field that will be empty... so i need to delete the / from the file that generates the list...

Thanks!

10 years ago
0
Level 2
Hi Pathos,

Thank you for your posts.
If you have a finite set of language, i advise you to define one description field per one language in the same form.
In the content view, you can use a "custom variation" (mini template of seblod like seb_css3) to display the description according to the current language.

Regards,
Mehdi.
Get a Book for SEBLOD