Search Module question..

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Minefox
Forum Members
Forum Members
Posts: 23
Joined: Sat Jan 01, 2011 4:36 am

Search Module question..

Post by Minefox »

Hi! Is there a way for the "search module" to search thru metadata?
Like searching thru keywords..
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm
Location: London, United Kingdom

Re: Search Module question..

Post by mrenigma »

The only way I think this might work is to create a "keywords" content block with all your keywords used within your meta.

Then that would be applied to the "keywords" meta tag in your template and the search function could pick it up.
~ Life is like water, every movement you make changes the way it flows ~
Minefox
Forum Members
Forum Members
Posts: 23
Joined: Sat Jan 01, 2011 4:36 am

Re: Search Module question..

Post by Minefox »

mrenigma,

can you show me how to put a content block in a meta tag?
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm
Location: London, United Kingdom

Re: Search Module question..

Post by mrenigma »

Hi Minefox,

The easiest way would be to have your header stored in a Global Content Block and then on your template write something similar to this:

Code: Select all

{content block="metaKeywords" label="Meta Keywords" oneline=true assign="keywords"}
{global_content name="header"}

... rest of template ...
Within the header template you would want to then call:

Code: Select all

 .. Usual start to HTML and <head> ...
 
{if !empty($keywords)}
  <meta name="keywords" content="{$keywords}" />
 {/if}

 .. Rest of HTML header ...
~ Life is like water, every movement you make changes the way it flows ~
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Search Module question..

Post by calguy1000 »

can you show me how to put a content block in a meta tag?
Easiest way would be something like:

<meta name="keywords" content="{content block='keywords' oneline='true' label='Enter SEO keywords here'}"/>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Minefox
Forum Members
Forum Members
Posts: 23
Joined: Sat Jan 01, 2011 4:36 am

Re: Search Module question..

Post by Minefox »

Hi calguy1000,

Got your code working in my specific page. But still the Search function was not able to find the keyword i placed inside the content block. ie

In Content Block the keywords are "Minefox, Dude". This content block is specific for a certain page. Inside the page, I put in the Page Specific Metadata a code that looks like this
<meta name="keywords" content="{global_content name='keyword1' oneline='true' label='SEO keyword'}"/>
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm
Location: London, United Kingdom

Re: Search Module question..

Post by mrenigma »

Have you tried going to the Search module under "Extensions" and clicking the "reindex" button?
~ Life is like water, every movement you make changes the way it flows ~
Post Reply

Return to “Modules/Add-Ons”