Developer forum

Forum » Templates » DwSearchLayer tag

DwSearchLayer tag


Reply

Hi,


 


I am developing a website that has the search module. The templates reference website tells me that I need this tag so that users can search the webpage, but it actually makes no diferrence. What does this tag really do?


Best Regard,


Nuno


Replies

 
Reply

Hi Nuno


This tag does nothing.  It's only in the templates for backwards compatibility.


It's used to insert a searchbox from the old outdated searchmodule, but today we just copy the sourcecode from a paragraph with the searchmodule attached.


// Sebastian

 
Reply
Dammark wrote:


Hi Nuno




This tag does nothing.  It's only in the templates for backwards compatibility.




It's used to insert a searchbox from the old outdated searchmodule, but today we just copy the sourcecode from a paragraph with the searchmodule attached.




// Sebastian





Hi Sebastian,


Good to know. Thanks a lot.


Nuno

 
Reply
Dammark wrote:





Hi Nuno








This tag does nothing.  It's only in the templates for backwards compatibility.








It's used to insert a searchbox from the old outdated searchmodule, but today we just copy the sourcecode from a paragraph with the searchmodule attached.








// Sebastian










How do I find the code I need to copy? My problem is, that I want the search box to be positioned in the header of the site. And I would hate to have to add the search paragraph to each and every page template I have in my site.




 




Isnt it possible to add the searchbox as a tag, just like a menu or the breadcrumb?

 
Reply

Hi Sune


 


1. Add the module Search Weighted to a paragraph on a page.


2. View this page in a browser.


3. View the source and copy the form that generates the searchfield.  Remember to get the fom tags and input tags.


4. Paste this code into your page template.


 


This is the easiest way and it will give you alot more flexibility than a regular DW-tag.


 


// Sebastian

 
Reply
Dammark wrote:


Hi Sune




1. Add the module Search Weighted to a paragraph on a page.




2. View this page in a browser.




3. View the source and copy the form that generates the searchfield.  Remember to get the fom tags and input tags.




4. Paste this code into your page template.




This is the easiest way and it will give you alot more flexibility than a regular DW-tag. 




// Sebastian





Nice and fast reply :)


 


I'll try that and see if I can make it do what I want it to.

 
Reply

It sounded so easy, but I cant get it to work.


 


If I just copy the form and fields from a paragraph to a the top of my page, then Im having trouble getting the search results to show. Is it correct that I need to have both the search field in the header, and also on the page itself?


 


Basically what I want to is that if you use the search field in the header, the results will be shown on a special "searchresults" page.


 


From what I have found out, the hidden field



Means that the page will go to the page with id=9 when you click search?


 


How do I define on this page, where it should show the results?


 


I can also see, that the following is inserted:


 


Is this used to make the search work?

 
Reply

Hi Sune


 


Can you post an URL for the website, then I'll have a look at it.


 


// Sebastian

 

You must be logged in to post in the forum