4,748 Views 8 Replies Last post: Oct 27, 2008 8:08 AM by dpmccabe RSS
Jacob Mathai Novice 28 posts since
Dec 28, 2007
Currently Being Moderated

Aug 20, 2008 5:08 PM

Customized Meta Tags in Clearspace Community

Hello,

 

Does anyone have any experience customizing the keyword meta tags within pages in clearspace? We know how to set global attributes that would apply keywords to all pages in the system by manipulating the jive_clearspace_i18n_en.properties file. These keywords as expected with a templating system -- will apply to all pages.

 

Has anyone figured out a a way to have more relevant (contextual keywords on pages (manual or automated)? Any suggestions would be greatly appreciated

 

 

-J

Tags: seo
Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Aug 21, 2008 9:44 AM in response to: Jacob Mathai
Re: Customized Meta Tags in Clearspace Community

HI Jacob,

 

This functionality has been discussed a few times in the past and it would probably be possible via a customization. I am not sure about the automatic method, you might be able to do something like checking if any tags exist on a document/thread/etc and apply these to the meta tags in the page. If you wanted manual keywords you would likely have to edit the FTL files directly. Thanks.

 

-Todd

benjamin Jive Employee 40 posts since
Jun 28, 2001
Currently Being Moderated
Oct 26, 2008 9:54 PM in response to: Jacob Mathai
Re: Customized Meta Tags in Clearspace Community

Jacob-

 

I'll echo what Todd says; currently, accomplishing something like this requires custom coding in the freemarker template (ftl) files which make up your theme.

 

First, you would need to become familiar with the theming functionality of Clearspace. We have two sections of documentation dedicated to this:

 

If you are on 2.0, try the Theming Guide.

 

If you are familiar with freemarker and java, you can dive into the source code and start finding hints at how to accomplish your goals. As Todd pointed out, nothing "automatic" exists as we don't yet have such functionality in the product, but your customization could be simple and add manual SEO keywords by manually matching document names, URLs, etc, or, it could be as complex as you wish to implement.

 

On this community, we've chosen to use one theme and customize different look and feel elements based on logic within the theme. Some of this is done by checking the properties of different Clearspace objects, while some is done by simple pattern matching on the Java Servlet HTTPServleRequest object.

 

It is possible to modify only ftl files which are used to display documents or message threads, or for a global change you could make changes in the top-level template.ftl.

 

A few code examples:

Getting property on the current community:

 <#if (community?exists && community.properties?exists && community.properties.get("myProperty")?exists)> 
       <#assign valueOfMyProperty = "${community.properties.get('myProperty')}"/>
 </#if>

Checking the current URL context:

 <#if (request.getContextPath()?matches("/myclearspaceinstall")) >
      <#!-- do something here -->
 </#if>

 

Hope the tips may be of use to you.

 

Edit: Fixed links.

Geoff Novice 34 posts since
Jul 2, 2008
Currently Being Moderated
Oct 1, 2008 5:33 PM in response to: Jacob Mathai
Re: Customized Meta Tags in Clearspace Community

FYI the link to the Theming Guide isn't valid...

Geoff Novice 34 posts since
Jul 2, 2008
Currently Being Moderated
Oct 1, 2008 6:19 PM in response to: Todd West
Re: Customized Meta Tags in Clearspace Community

Thanks todd

dpmccabe Novice 86 posts since
Oct 1, 2008
Currently Being Moderated
Oct 26, 2008 6:42 PM in response to: Jacob Mathai
Re: Customized Meta Tags in Clearspace Community

Where can the jive_clearspace_i18n_en.properties file be found?

 

Thanks,

 

Damian

Todd West Jive Employee 15,918 posts since
Jul 14, 2008
Currently Being Moderated
Oct 26, 2008 9:02 PM in response to: dpmccabe
Re: Customized Meta Tags in Clearspace Community
dpmccabe Novice 86 posts since
Oct 1, 2008
Currently Being Moderated
Oct 27, 2008 8:34 AM in response to: Todd West
Re: Customized Meta Tags in Clearspace Community

Thanks Todd!

 

To confirm, this is where I can edit the proprties I see the the FTLs:

 <#if (jiveContext.licenseManager.external)> 
         <meta name="keywords" content="<@ww.text name=' dectr.community.keywords'/>"/> 
     <#else> 
         <meta name="keywords" content="<@ww.text name=' dectr.collaboration.keywords' />"/> 
     </#if>

Or can thse be overridden in the "System Properties" area of the admin console?

 

Thanks,

 

D

More Like This

  • Retrieving data ...

Bookmarked By (0)