Page 1 of 1

Problem with custom Title tag [solved]

Posted: Fri Feb 08, 2013 11:10 am
by vhaakman
Hi,
I'm working on http://www.babytalkcafe.nl, and wanted to incorporate some SEO tricks as described here: http://docs.cmsmadesimple.org/customizi ... timization

So I copied the customized title part and placed it in the head orf my template, like this:

{content block="custom_title" assign="custom_title" oneline=true label="Custom Title Text"}

{if $custom_title}
<title>{custom_title}</title>
{else}
<title>{title} - {sitename}</title>
{/if}

now two things go wrong here, but I can't find the solution, so maybe one of you guys can help me out here.

first: if I go to edit the page, it shows a wysiwig content block instead of a oneline, although this is set to true. That already indicates something goes wrong, although at the other hand the block seems recognized by the system.

Then, if I display the homepage, I first get a smarty error:
Smarty error: [in tpl_head:23 line 6]: [plugin] unknown tag - 'custom_title'

But, there's no title shown at all, so in the if/then/else above, there is a true, which doesnt seem to make sense looking at the smarty error.

Anyway, if anyone can give me a clue what goes wrong here, that would be very apreciated.

Thanks, Vincent

Re: Problem with custom Title tag

Posted: Fri Feb 08, 2013 12:29 pm
by Rolf
Hi Vincent,

There was a typo in the text... Try:

Code: Select all

{content block="custom_title" assign="custom_title" oneline="true" label="Custom Title Text"}

{if $custom_title}
<title>{$custom_title} - {sitename}</title>
{else}
<title>{title} - {sitename}</title>
{/if}
grtz. Rolf

Re: Problem with custom Title tag

Posted: Fri Feb 08, 2013 1:19 pm
by vhaakman
That indeed did the trick, don't know where i lost the $ signs and quotes. But solved, thanks!

Re: Problem with custom Title tag

Posted: Fri Feb 08, 2013 1:28 pm
by Rolf
vhaakman wrote:don't know where i lost the $ signs and quotes.
You didn't, it was a typo at the docs website ;)