Showing search and newsletter fields

post everything related to phpwcms templates here
Post Reply
blanders
Posts: 22
Joined: Mon 4. Aug 2008, 20:31

Showing search and newsletter fields

Post 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.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: Showing search and newsletter fields

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Showing search and newsletter fields

Post 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.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
blanders
Posts: 22
Joined: Mon 4. Aug 2008, 20:31

Re: Showing search and newsletter fields

Post 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?
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Showing search and newsletter fields

Post by Oliver Georgi »

check what I have replied. SHOW_CONTENT is crap here.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
blanders
Posts: 22
Joined: Mon 4. Aug 2008, 20:31

Re: Showing search and newsletter fields

Post 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?
Post Reply