• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [solved] Title Tag for SEO
PostPosted: Mon Dec 10, 2012 6:40 pm 
Offline
Forum Members
Forum Members

Joined: Fri Sep 28, 2012 9:00 am
Posts: 18
I have tried the following that I found on the documentation

Code:
{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}


As I wish to have a different title tag for each product in my cms. When I add the above to the template, it falls over. Am I doing this wrong??? I have added the above block to the template, but I get an error then?


Last edited by zimmo on Fri Apr 26, 2013 8:28 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Title Tag for SEO
PostPosted: Mon Dec 10, 2012 6:59 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 2089
Location: Feldkirchen in Kärnten, Austria
It falls over, translated probably means that you have recieved a error message, but didn't bother to mention it?

That error message told you something about unrecognized tag.
Which comes from {custom_title} that is trying to trigger a Smarty plugin name {custom_title}, which well doesn't exist.

When you assigned in content block assign="custom_title", you have assigned it to a variable, which means you should also call that as a variable {$custom_title}

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
Twitter
=============================================
Support CMSMS


Top
 Profile  
 
 Post subject: Re: Title Tag for SEO
PostPosted: Mon Dec 10, 2012 7:33 pm 
Offline
Forum Members
Forum Members

Joined: Fri Sep 28, 2012 9:00 am
Posts: 18
Sorry about that. The error is a smarty template error like you say. But the thing is I am unsure how I add this variable or even do this, I am still new to smarty and cmsms.

The documentation is not very clear then. Can you tell me how I get this to work, where do I add the smarty plug in?

Sorry just trying to get this to work. Appreciate the support.


Top
 Profile  
 
 Post subject: Re: Title Tag for SEO
PostPosted: Mon Dec 10, 2012 7:37 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Tue Aug 12, 2008 9:30 pm
Posts: 2089
Location: Feldkirchen in Kärnten, Austria
But i answered already ;D replace {custom_title} with {$custom_title}, you have assigned a content block to a variable, then you should use it as variable.

_________________
CMSMS Blog - I do this!
Forge profile
Github profile
Twitter
=============================================
Support CMSMS


Top
 Profile  
 
 Post subject: Re: Title Tag for SEO
PostPosted: Mon Dec 10, 2012 7:39 pm 
Offline
Forum Members
Forum Members

Joined: Fri Sep 28, 2012 9:00 am
Posts: 18
Ahhh sorry, that simple eh.. Thanks very much got that working how I want it. Impressed that it is on the Main Option page as well, so you can do it all in one place. Brilliant. Many thanks


Top
 Profile  
 
 Post subject: Re: Title Tag for SEO
PostPosted: Tue Jan 29, 2013 9:11 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12267
Location: Arizona
@zimmo

viewtopic.php?f=3&t=8692

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: chandra


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner