Page 1 of 1
Showing search and newsletter fields
Posted: Fri 4. Mar 2011, 21:06
by blanders
Should be a simple one but I don`t find answer from this forum -
how to display search input field on phpwcms template (for example like on top right corner in this forumpage).
Same question about "sign up for newsletter" input field. My goal is to create "search" and "sign up for newsletter" input FIELDS directly on indexpage.
Should the field be named with some special name eg {content:news} etc?
Thanks for any tip.
Re: Showing search and newsletter fields
Posted: Sat 5. Mar 2011, 05:23
by juergen
Good morning
{SHOW_CONTENT:CP,xxx} is the easiest way to get things inside a template, where xxx is the number of the ContenPart you mention.
Easily replicate this tag for another time on other place in the template
Re: Showing search and newsletter fields
Posted: Sat 5. Mar 2011, 11:39
by Oliver Georgi
Check the rendered code of the target page – copy and paste the rendered parts of HTML you need, change id of fields – let <input> name attribute the same. Set <form> action attribute targeting the page that contains the related Content Part. There are replacement tags for search action, value.
Re: Showing search and newsletter fields
Posted: Sat 5. Mar 2011, 16:13
by blanders
Thanks for tip. I used this way, in my case {SHOW_CONTENT:CP,196} and I can see the search field now!
But search results will appear in the same window and it`s a mess. You can see it from here:
http://www.autoalarm.ee/web/.
How to display search results on a different page?
Re: Showing search and newsletter fields
Posted: Sat 5. Mar 2011, 16:45
by Oliver Georgi
check what I have replied. SHOW_CONTENT is crap here.
Re: Showing search and newsletter fields
Posted: Tue 8. Mar 2011, 22:00
by blanders
Thanks, got this working now! How can I change the appearance of how the search field will look like, buttons etc. Same for newsletter style.
I guess it can be done through CSS somehow, does anyone have a ready CSS for search input?