$def with(query, title=None, sort='new', key='', limit=20, search=False, has_fulltext_only=True, url=None, layout='carousel', use_cache=True) $# Takes following parameters $# * query (str) -- Any arbitrary Open Library search query, e.g. subject:"Textbooks" $# * title (str) -- A title to show above the carousel (links to /search?q=query) $# * sort (str) -- optional sort param defined within work_search.py `work_search` $# * key (str) -- unique name of the carousel in analytics $# * limit (int) -- initial number of books to pull $# * search (bool) -- whether to include search within collection $# * layout (str) -- layout type, default 'carousel', currently also supports 'grid' $if use_cache: $:macros.CacheableMacro("RawQueryCarousel", query, title=title, sort=sort, key=key, limit=limit, search=search, has_fulltext_only=has_fulltext_only, url=url, layout=layout) $else: $:macros.RawQueryCarousel(query, title=title, sort=sort, key=key, limit=limit, search=search, has_fulltext_only=has_fulltext_only, url=url, layout=layout)