Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
etc_search / estate agent site
Willing to pay to help me with this website https://www.studentlifelettings.co.uk
Search is powered by etc_search. the owner has requested a “view only available” option added to the search form.
Can somebody help at all? Probably very simple but beyond me
Offline
Re: etc_search / estate agent site
Hi Miles,
Beautiful site!
how do you handle, in txp, the availability? a custom_field, category, section, some other way…. ?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: etc_search / estate agent site
Thank you very much :)
Good question. Its handled by a custom_field with the following perimeters:
added
let
new
Offline
Re: etc_search / estate agent site
Hi Miles, nice site indeed!
That looks doable, it would probably even suffice to post here your search query id=1
details and the number of the custom field you wrote above. Or send me a login if you prefer.
And probably in txp 4.7 you will be able to get rid of etc_search
to obtain what you need here.
Offline
Re: etc_search / estate agent site
Thank you etc thats very kind
I have just emailed you the login. My query is:
{custom_11::/^(.+)$/::{*} = '$1'} ORDER BY Posted desc
and my custom field number is 23
The code on the page is:
<txp:etc_search id="1" wraptag="p" match="exact" sort="Posted desc" action="<txp:site_url />accommodation" class="filter slider" label="">
<div class="row">
<div class="col-xs-6 col-sm-6 ">
<div class="form-group">
<select name="q" class="form-control">
<option value="1">1 Bedroom</option>
<option value="2">2 Bedrooms</option>
<option value="3">3 Bedrooms</option>
<option value="4">4 Bedrooms</option>
<option value="5">5 Bedrooms</option>
<option value="6">6 Bedrooms</option>
<option value="7">7 Bedrooms</option>
<option value="8">8 Bedrooms</option>
<option value="9">9 Bedrooms</option>
<option value="10">10 Bedrooms</option>
<option value="11">11 Bedrooms</option>
<option value="12">12 Bedrooms</option>
<option value="13">13 Bedrooms</option>
<option value="14">14 Bedrooms</option>
</select>
</div>
<!-- /.form-group -->
</div>
<!-- /.col-* -->
<div class="col-xs-6 col-sm-6 ">
<button type="submit" class="btn btn-primary">Quick Search</button>
</div>
<!-- /.col-* -->
</div>
<!-- /.row -->
</div>
</txp:etc_search>
EDIT: bc..
added.
Offline
Re: etc_search / estate agent site
Hi, sorry to go off topic Miles but would you like to have one of your lovely sites put into our Textpattern showcase? If so message me directly. Cheers!
Offline
Re: etc_search / estate agent site
miles wrote #310428:
Thank you very much :)
Good question. Its handled by a custom_field with the following perimeters:
added
let
new
Did you consider of just using article_custom instead of search? Something like:
<txp:article_custom customfieldname="added">
<txp:permlink><txp:title /></txp:permlink>
<txp:excerpt /> etc
</txp:article_custom>
You will of course have to change customfieldname
to whatever you named the custom field.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: etc_search / estate agent site
Thank you for all your advice. etc kindly edited the code for me.
{custom_11::/^\d+$/::{*} = '$0'} AND {?ex|::/^\w*$/::TRIM(custom_23) != '$0'} ORDER BY Posted desc
Hope that helps someone in the future.
Would love to be in the showcase Phil. Will email you shortly
Offline