Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-03-28 17:57:47

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

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

#2 2018-03-28 18:10:46

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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

#3 2018-03-28 18:18:49

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

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

#4 2018-03-28 19:53:03

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

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

#5 2018-03-28 20:05:11

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

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

#6 2018-03-28 20:37:38

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#7 2018-03-29 07:45:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

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

#8 2018-04-02 19:29:55

miles
Member
From: Plymouth
Registered: 2008-05-22
Posts: 78
Website

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

Board footer

Powered by FluxBB