1

I'm running into a quite simple problem : I would add fields to a view description, in order to list my views by this field.

Example : add a taxonomy field to the views, let's say "View color". Then, I would create a view of views, only for the views having a color, ordered by their colors and letting me see a XML containing the color and a link to the view's page :

<...>
    <view>
        <color>red</color>
        <link>http://example.com/path-to-red-view</link>
        <color>blue</color>
        <link>http://example.com/path-to-blue-view</link>
    <....>
</...>

I don't want to generate the links by rewriting (I know how to do that), but really add a field to the views.

The question is a bit wobbly, but I don't figure out how to write it. I found nothing on the web describing what I want to do, maybe due to that.

Thereby, all help is welcome !

Thanks

6
  • 1
    Views aren't field-able, I think you'll end up needing to write something custom for this
    – Clive
    Commented Apr 21, 2015 at 13:09
  • Thanks @Clive, you are faster at answering than me at writing ! Is something possible with drupal.org/project/entity or something ?
    – Benj
    Commented Apr 21, 2015 at 13:12
  • Maybe creating a content type which contains the view name and a taxonomy field, then getting that from the view, linked by its name ?
    – Benj
    Commented Apr 21, 2015 at 13:14
  • Okay, let's say I'm less ambitious : can I create a view listing all my other views, getting their name and path (just to know) ?
    – Benj
    Commented Apr 21, 2015 at 13:39
  • Sure, have a look at how Views does the same thing with the main admin page in the Views UI module
    – Clive
    Commented Apr 21, 2015 at 14:02

1 Answer 1

0

I don't know that it will provide all the functionality you are looking for, but you could look into Views Field View:

This module allows you to embed a view as a field in a view. A new field handler is made available, so this can also be used in area (header/footer/empty) handlers as well as rows.

This view handler can accept arguments from fields of the parent view using tokens and pass them into the child view for each row. Raw or rendered token values can be used, as well as static values.

1
  • Sure, I'd looked at this module, but it does not seem to be what I expect : being able to list a group of views filtered by a criterion, preferably a field. Not sure I'm very precise ?
    – Benj
    Commented Apr 21, 2015 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.