Andreas Widerøe Andersen
|
Wednesday 07 April 2004 4:06:57 pm
Hi, I'm am a beginner with Ez and have some hard time finding information about how to add a search option like the one up in the right corner here on the Ez site. Can someone please give some step-by step help here? I have also problems with a mail form that I found some info on in the forum:
<form action={"/form/process"|ezurl} method="post">
<input type="text" name="LastName" value="Navn" />
<input type="text" name="MailSendFrom" value="E-post adresse" />
<input type="hidden" name="MailSubject" value="Tips fra leser" />
<input type="hidden" name="MailSendTo" value="me@email.com" />
<textarea cols="20" rows="5" name="tips">Skriv inn ditt tips!</textarea>
<input type="hidden" name="RedirectTo" value="http://www.mysite.com" />
<input type="submit" value="Send" />
</form>
When I use this I only get:
Access denied You don't have permission to access this area. Possible reasons for this is.
You are currently not logged in to the site, to get proper access create a new user or login with an existing user. You misspelled some parts of your url, try changing it. I appreciate your help!
Thanks, Andreas
|
Alex Jones
|
Thursday 08 April 2004 6:05:41 am
Andreas, you can use the code below for your search box. I grabbed it from /design/standard/templates/page_topbox.tpl which is included in every eZ publish installation.
<form action={"/content/search/"|ezurl} method="get">
<table class="layout" width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td class="topline" width="40%">
<img src={$top_logo|ezimage} alt="" />
</td>
<td class="topbox" align="right" width="50%" valign="bottom">
<br />
<input class="halfbox" type="text" size="20" name="SearchText" id="Search" value="" /><br />
<a class="topline" href={"/content/advancedsearch/"|ezurl}><span class="small">{"Advanced search"|i18n("design/standard/layout")}</span></a><div class="labelbreak"></div>
</td>
<td class="topbox" valign="top" width="10%">
<br />
<input class="button" name="SearchButton" type="submit" value="{'Search'|i18n('design/standard/layout')}" />
</td>
</tr>
</table>
</form>
<b>Mail Form</b> Check the permissions for the <i>Anonymous</i> user (under Users > Roles > Anonymous) to ensure they have the proper rights to use the form module. Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|
Andreas Widerøe Andersen
|
Thursday 08 April 2004 7:30:28 am
Already did that. It now says:
Role policies
Module Function Limitation
user login *
content read Class( Folder , Info page , Info page , Link , Link , File , File , Comment , Comment , Article , Article , Image , Image , Forum , Forum , Forum message , Forum message , Product , Product , Product review , Product review )
content read Class( Ressurser )
form * *
I've also set this:
[FormProcessSettings] Module=enabled in the site.ini.append file for my layout. Any other suggestions? Btw. I got the search function working - thanks! Andreas
|
Alex Jones
|
Thursday 08 April 2004 11:42:43 am
It's good to hear you have it working! After changing any major setting, it is good to clear all of the caches, which can cause problems with changes not showing up. Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|