Difference between revisions of "Template:EventsForThisPage"

From Culture.si
Line 1: Line 1:
{{{fld = {{{field|Related}}}}}}
+
{{{fld ={{{field|Related}}}}}}
 
 
field: {{{fld}}<br>
 
 
{{#arr:dataloop
 
{{#arr:dataloop
 
|{{#data:select
 
|{{#data:select
Line 11: Line 9:
 
}}
 
}}
 
<div>
 
<div>
{{#arr:dataloop
+
{ {#arr:dataloop
|{{#data:select
+
|{{#data:sql
 
   | Description=Event.Description
 
   | Description=Event.Description
 
   | Start = Event.Start
 
   | Start = Event.Start

Revision as of 18:21, 25 April 2018


{ {#arr:dataloop

|
SELECT DISTINCT
	(__Event."Description") AS "Description",
	(__Event."Start") AS "Start",
	(__Event."End") AS "End",
	(__Event."Url") AS "Url",
	(__Event."Editcall") AS "Editcall",
	(__Event."Organizer_url") AS "Organizer_url",
	(__Event."More_url") AS "More_url",
	(__Event."Work_url") AS "Work_url",
	(__Event."Festival") AS "Festival",
	(array_to_string(array_agg(DISTINCT replace(__Event__x__City._multi_to,'_',' ')),',')) AS "City",
	(array_to_string(array_agg(DISTINCT replace(__Event__x__Venue._multi_to,'_',' ')),',')) AS "Venue",
	(array_to_string(array_agg(DISTINCT replace(__Event__x__Country._multi_to,'_',' ')),',')) AS "Country" 
FROM "tbl_Event" AS __Event
LEFT JOIN "tbl__Event__x__City" AS __Event__x__City ON (__Event._row_ref = __Event__x__City._multi_from)
LEFT JOIN "tbl__Event__x__Venue" AS __Event__x__Venue ON (__Event._row_ref = __Event__x__Venue._multi_from)
LEFT JOIN "tbl__Event__x__Country" AS __Event__x__Country ON (__Event._row_ref = __Event__x__Country._multi_from)
LEFT JOIN "tbl__Event__x__Related" AS __Event__x__Related ON (__Event._row_ref = __Event__x__Related._multi_from) 
WHERE (__Event__x__Related._multi_to='EventsForThisPage' or __Event__x__Related._multi_to in (select page_title from redirect join page on rd_from=page_id where rd_title='EventsForThisPage')) and (__Event__x__Country._multi_to!='Slovenia') and to_char(coalesce(__Event."End",__Event."Start"),'YYYYMMDD') >= '20241106' 
GROUP BY 1,2,3,4,5,6,7,8,9  
ORDER BY __Event."Start" ASC 
LIMIT  150 
OFFSET 0
| first =
    | each =
  • 6 Nov 2024

    {{{Country}}} {{{City}}} {{{Venue}}}




    {{{Description}}}




  • | last =

}}