Forum

Thread tagged as: Question, Blog

Multilingual Blog-posts are saved as 'Post 1, Post 2, etc.' instead of the postT...

I've created a multilingual Blog using the PHP-variable '$lang'. In the post.html I've created a field per language, in this way:

<perch:if id="lang" value="nl"><perch:blog id="postTitle-nl" type="text" label="Titel (Nederlands)" required="true" order="1" /></perch:if>
<perch:if id="lang" value="en"><perch:blog id="postTitle-en" type="text" label="Titel (Engels)" required="true" order="2" /></perch:if>

All seems to work fine. But Perch is saving each post as 'Post 1', 'Post 2', etcetera instead of the postTitle. Is there a way I can tell Perch to use the postTitle?

Edwin Venhorst

Edwin Venhorst 0 points

  • 4 years ago

Yes. Add

title="true"

to the perch tag.

I've tried that, but unfortunately that doesn't work.

<perch:if id="lang" value="nl"><perch:blog id="postTitle-nl" type="text" label="Titel (Nederlands)" title="true" required="true" order="1" /></perch:if>
<perch:if id="lang" value="en"><perch:blog id="postTitle-en" type="text" label="Titel (Engels)" title="true" required="true" order="2" /></perch:if>
Drew McLellan

Drew McLellan 2638 points
Perch Support

postTitle is the designated title of the post, so it's probably best to use that for your default language.

That's it. Thanks Drew and Robert!