When I try to display the title of a layout (layout:title) in a template and the original entry is titled with a number less than 3 digits, it is blank. Only if I include a letter in the title or the title is greater than three digits does it appear correctly.
Does anyone know why?
It would help you get a faster / more complete reply if you could:
🐾
Hi Matahi, Just to confirm, you are using a layout variable with a layout Template and not trying to call it inside the same file. Correct?
General page to page_layout structure should be:
For the page:
{layout="_layouts/_my_page_layout"}
{exp:channel:entries channel="films" require_entry="no" dynamic="yes" limit="1"}
{layout:set name='title'}{title}{/layout:set}
{/exp:channel:entries}
In the page “_layouts/__my_page_layout” :
{layout:title}
R
I have been unable to replicate on my local system (EE7.3.14, php 8.1). What happens if you try some variations - do you get a result when you use this tag (for example)?
{exp:channel:entries channel="films" require_entry="no" dynamic="yes" limit="1"}
{layout:set name='title'}x-{title}{/layout:set}
{/exp:channel:entries}
and then in the template where you retrieve the value
{layout:title:replace find="x-" replace=""}
Would be interesting to know if it makes any difference. 🐾
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.