A Content block for the description meta tag

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Peciura

Re: A Content block for the description meta tag

Post by Peciura »

Code: Select all

It seems that I did everything as shown, but still does not working for me.
There should be set

Code: Select all

$config['process_whole_template'] = false;
ion your "/config.php"
and

Code: Select all

{process_pagedata}
at the top of your template.
Template processing is explained here
http://forum.cmsmadesimple.org/index.ph ... #msg203281
Marijus

Re: A Content block for the description meta tag

Post by Marijus »

Everything was done as follows.

But when I add

Code: Select all

{assign var='pagedescription' value="$entry->summary"}
to the news module detail template I got errror:

Catchable fatal error: Object of class stdClass could not be converted to string in ...../public_html/tmp/templates_c/News^%%8C^8CF^8CF5F68A%%module_db_tpl%3ANews%3Bdetaildetalus.php on line 62
Peciura

Re: A Content block for the description meta tag

Post by Peciura »

Try

Code: Select all

{assign var='pagedescription' value=$entry->summary}
Marijus

Re: A Content block for the description meta tag

Post by Marijus »

Peciura wrote: Try

Code: Select all

{assign var='pagedescription' value=$entry->summary}
Thanks that helps me.

And I changed a little code for news module detail template:

Code: Select all

{assign var='pagedescription' value=$entry->summary}
{if empty($pagedescription)}
{assign var='pagedescription' value=$entry->content}
{/if}
In case that summary field is empty.
Marijus

Re: A Content block for the description meta tag

Post by Marijus »

If in config file ['process_whole_template'] set to true then new description not working.
Post Reply

Return to “Tips and Tricks”