Page 1 of 1

Help with Search module

Posted: Mon Mar 05, 2007 1:27 pm
by frontline3k
Just started to convert my html template to CMSMadeSimple (wonderful piece of software btw)  8)

After studying wiki and forums, I can't find the way to solve my problems with the search module.
So here we go:

1. The {search} module inserted in my page doesn't look as good as I want, so ... I wanted to use my design for the search box.
Shortly, a text box and an image to submit the query, without using the {search} global module in my page.

So, I created my own form, like this (this is taken from source code of the default install):

Code: Select all

          <form id="cntnt01moduleform_1" name="cntnt01moduleform_1" method="get" action="index.php">
            <input type="text" name="cntnt01searchinput" id="cntnt01searchinput"/>
            <input type="image" src="images/search.gif" width="15" height="16"/>
            <input type="hidden" name="mact" value="Search,cntnt01,dosearch,0" />
          </form>
It's kind of working ... but I didn't find a way to pass the parameters lang and resultpage: (something like this {search lang='ro_RO' resultpage="News"}).
Maybe it's not the best solution. If there is a link to help with my problem ... I would appreciate :)

2. The search module doesn't search in Global Content Blocks.
For an easier administration, I break the design in blocks, and I can show them when and if I need them.

P.S: I'm using CMS Made Simple 1.0.4 "Lanai".

Thanks in advance for helping.
Have a nice day.

Re: Help with Search module

Posted: Mon Mar 05, 2007 1:33 pm
by RonnyK
frontline3k,

I use

Code: Select all

{search  searchtext="" resultpage="result"}
to make this run. "resultpage" is the page you want the results in. "searchtext" is the default value in the search-box. The language of the button is set by the default language of the frontend, through "Site admin -> Global Settings".

By the way, more information is available under "Extensions -> Search -> Help"

Ronny

EDIT: Sorry, this post is not answering your question. I've read it again, and you don't want to know about {search}

This post is about styling the default search:

http://forum.cmsmadesimple.org/index.ph ... 181.0.html

Re: Help with Search module

Posted: Mon Mar 05, 2007 2:03 pm
by frontline3k
Hello.

I know that, the problem is  I can't use the calling of the global module {search} (I can't customize the Search Template to fit my needs ... or at least I can't do it so far  :))

About the language ... thanks for the tip .. I will investigate it further  :)

Later edit: thanks for the link, I'm trying to do smth like this ....

Regards,
Sorin

Re: Help with Search module

Posted: Thu Mar 08, 2007 6:56 pm
by frontline3k
Kind of ... sort of ... solve it :)

In Search module, I modified Search Template with smth like this:

Code: Select all

{$startform}
<td valign="middle"><input type="text" name="cntnt01searchinput" id="cntnt01searchinput" class="searchbox"/></td>
<td valign="middle" align="right"> <input type="image" src="images/search.gif" width="15" height="16"/>{$hidden}</td>
{$endform}
and call it with

Code: Select all

{search resultpage="search"}
Any idea about why the search module does not search in global content blocks ?  ???

Regards,
Sorin

Re: Help with Search module

Posted: Thu Mar 08, 2007 7:01 pm
by cyberman
frontline3k wrote: Any idea about why the search module does not search in global content blocks ?  ???
... cause they are not indexed  ::).

Re: Help with Search module

Posted: Thu Mar 08, 2007 9:36 pm
by frontline3k
... and the magic question: how can I index them ?  8)

I've created a few pages and used a modular design, with large part of them in blocks, for an easier editing and maintaining.

Any idea ?

Re: Help with Search module

Posted: Fri Mar 09, 2007 5:13 am
by cyberman
Haven't tried yet but maybe pageblocks would be the better (indexed ?) solution  ::)

http://dev.cmsmadesimple.org/projects/pageblocks/