[support] Views filter rooms by occupacy

Lluís Forns enboig at gmail.com
Tue Jan 20 10:40:33 UTC 2015


I use entity reference to connect them.

I thing a way to achieve this is adding a context filter for NID and using
PHP to select all rooms occupied and remove them. I have a view to select
reservations by date, I could call it using PHP, apply the date filter, and
get the nids to remove.

My problem now is how to call a view programatically just to get the nids.

2015-01-20 6:20 GMT+01:00 muhammed naushad <naushunaushad24 at gmail.com>:

> I would recommend you to use custom module.
>
> If you want to use the view please mention how you connect these two
> content types?
>
> On Mon, Jan 19, 2015 at 6:37 PM, Lluís Forns <enboig at gmail.com> wrote:
>
>> I have a site with 2 content types: rooms and reservations. I want to
>> list all the rooms without a reservation for an interval, and also for
>> services, capacity, ....
>>
>> I tried creating a view with a PHP filter to check free rooms, but then
>> if the page lists 10 rooms, sometimes there are 7, 2, or 0; because the
>> filter lists the 10 rooms and after remove the occupied ones.
>>
>> I have tried to create a "subview" filter to select nodes "not in (view
>> of occupied rooms); but I haven't find a way to do so.
>>
>> Any idea of how to accomplish this?
>>
>> thanks
>> --
>> *Ser freak no és imprescindible per ser informàtic, però ajuda.
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
>
>
> --
> Thanks
> Muhammed Naushad
> Web Developer
> +971529187882,+919744663973
> http://stunningspider.com
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
*Ser freak no és imprescindible per ser informàtic, però ajuda.
*La vida no ha de ser feliç, ha de ser plena.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20150120/6a1a9563/attachment.html 


More information about the support mailing list