Extra Attributes.... use them for meta tags?
In CMS Made Simple 1.5 (or something) we added a few extra properties to the various content types.... extra1, extra2, and extra3.... Some people have been asking 'what are these for?'... well the simple answer is 'anything you want'.
You can use them for pretty much anything. I have usedthem in conjunction with the FrontEndUsers and CustomContent modules to list groups that are allowed to view specific pages. I've used them to display images on pages (before I added the image and thumbnail properties).... there are lots of ways you can use thise fields... they are just generic properties for a page.
But what about meta tags? Why not use those fields to provide some additional meta tag information.... Maybe you don't want google to index this page.... well lets try to use the extra2 field to handle that.
Try this.
Enter this text into the 'extra2' field (on the options tab) when editing a page: noindex (be careful with whitespace).
Then, in your page template (in the area between <head> and </head>) you should be able to do something like:
{capture assign='robots'}{$content_obj->GetPropertyValue('extra2')}{/capture}
This will process that content (the stuff inside the tags, and assign it to the smarty variable 'robots'. (I'll explain later what $content_obj is).
Next, you can use something like:
{if !empty($robots)}<meta name="robots" value="{$robots}">{/if}
Save your page template, and refresh the appropriate page. When you view the page source, you should see something like:
<meta name="robots" value="noindex">
Now google shouldn't index that page... or any page that have that value set in the 'extra2' property in the options tab.
Now you know one way (and there are many) that you can use the extra attributes that are associated with each content item in your page content.
CMS Made Simple - Modules/Add-Ons
Re: Announcement: New plug-in SuperSizer- Thu, 29 Jul 2010 20:40:15 GMT
ok.. here is it.. all fixed and should be ready now to release.. |
Re: How do I get the latest version of a file- Thu, 29 Jul 2010 20:28:47 GMT
Hi |
Re: Custom JQuery Image Rotation?- Thu, 29 Jul 2010 20:21:31 GMT
wait.... i AM using the gallery module... |
Re: CGBlog - A several of things- Thu, 29 Jul 2010 20:17:22 GMTnever mind fixed it. there was some google analytics that were not liberalized. My mistake. |
Re: Photo Album: unchecking Inline Links Stops Lytebox from Working- Thu, 29 Jul 2010 19:56:21 GMTDo you have the {metadata} tag in the <head> section of your template? |
CMS Made Simple Blog
Announcing CMS Made Simple 1.8.1 - Mankara- Tue, 13 Jul 2010 14:06:34 -0400This release fixes an important security vulnerability, we recommend that ALL users upgrade as soon as possible. The local inclusion vulnerability fixed is old and affects many previous versions of CMSMS. Therefore it is important for ALL... |
Announcing CMS Made Simple 1.8 - Madagascar- Sat, 03 Jul 2010 20:26:55 -0400Onwards and upwards we go. The dev team is proud to announce the latest version of your favorite content management system. This version is primarily aimed at rounding out some of the rough edges that our primary audience... |
New Site Launch- Mon, 28 Jun 2010 00:29:44 -0400After weeks of blood, sweat and tears, we've finally launched our long awaited redesign. It's taken approximately two months from design to implementation to launch, but we're finally here. Along with our main site, we've also reskinned the... |
Announcing Geek Moot 2010- Mon, 21 Jun 2010 10:19:21 -0400It's that time again. The developers of CMS Made Simple have finalized plans for our yearly user conference. This year, we're thinking much bigger, so join us. On 16-17 September, CMS Made Simple will host the second public Geek... |
Announcing CMS Made Simple 1.7.1 - Escade- Sat, 01 May 2010 09:47:13 -0400Woot! CMSMS keeps getting better and better. Even though it's only a point release, this version of CMSMS fixes numerous minor bugs and adds some important features. We didn't feel that the list of changes were extensive enough to... |

