Difference between revisions of "Template:EventsForThisPage"
(98 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{{fld=Event.{{ucfirst:{{{field|Related}}}}}}}}{{{pg={{{page|}}}}}}{{#arr:dataloop | ||
+ | |{{#data:select | ||
+ | | Event.# | ||
+ | | #where = ({{{fld}}}={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}} or {{{fld}}} in (select page_title from redirect join page on rd_from=page_id where rd_title={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}})) and Event.Country!='Slovenia' | ||
+ | | #limit = 1}} | ||
+ | | first = <div class="contact-info-title">{{#if:{{{1|}}}|<h2>{{{1}}}</h2>| | ||
+ | {{#ifeq:{{{field}}}|country | ||
+ | |{{#title:link|Search_Events?country={{{pg}}}||Events in {{{pg|}}}}} | ||
+ | |[[Search_Events|Events {{#if:{{{pg|}}}| {{{pg|}}}|abroad}}]] | ||
+ | }}}} | ||
+ | </div>}}<div> | ||
{{#arr:dataloop | {{#arr:dataloop | ||
|{{#data:select | |{{#data:select | ||
Line 6: | Line 17: | ||
| Url = Event.Url | | Url = Event.Url | ||
| Editcall = Event.Editcall | | Editcall = Event.Editcall | ||
+ | | Organizer_url = Event.Organizer_url | ||
+ | | More_url = Event.More_url | ||
+ | | Work_url = Event.Work_url | ||
+ | | Festival = Event.Festival | ||
| City = {{groupLinks|Event.City}} | | City = {{groupLinks|Event.City}} | ||
| Venue = {{groupLinks|Event.Venue}} | | Venue = {{groupLinks|Event.Venue}} | ||
| Country = {{groupLinks|Event.Country}} | | Country = {{groupLinks|Event.Country}} | ||
− | | #groupby = | + | | #limit = 150 |
− | | #where = | + | | #groupby = 1,2,3,4,5,6,7,8,9 |
− | | #orderby = Event.Start | + | | #where = ({{{fld}}}={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}} or {{{fld}}} in (select page_title from redirect join page on rd_from=page_id where rd_title={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}})) and (Event.Country!='Slovenia') and to_char(coalesce(Event.End,Event.Start),'YYYYMMDD') >= '{{#timel:Ymd|{{CURRENTDATE}}}}' |
+ | | #orderby = Event.Start ASC | ||
}} | }} | ||
− | | first = | + | | first = <ul class="events"> |
| each = {{#eval:wrap|{{{template|ListEvent}}}}} | | each = {{#eval:wrap|{{{template|ListEvent}}}}} | ||
− | | last = </ul> | + | | last = </ul>{{#eval:html|<a class="show-more-events more_go">Show more</a>}} |
− | }} | + | }}{{#arr:dataloop |
+ | |{{#data:select | ||
+ | | Description=Event.Description | ||
+ | | Start = Event.Start | ||
+ | | End = Event.End | ||
+ | | Url = Event.Url | ||
+ | | Editcall = Event.Editcall | ||
+ | | Organizer_url = Event.Organizer_url | ||
+ | | More_url = Event.More_url | ||
+ | | Work_url = Event.Work_url | ||
+ | | Festival = Event.Festival | ||
+ | | City = {{groupLinks|Event.City}} | ||
+ | | Venue = {{groupLinks|Event.Venue}} | ||
+ | | Country = {{groupLinks|Event.Country}} | ||
+ | | #groupby = 1,2,3,4,5,6,7,8,9 | ||
+ | | #where = ({{{fld}}}={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}} or {{{fld}}} in (select page_title from redirect join page on rd_from=page_id where rd_title={{#cast:ref|{{{1|{{{page|{{PAGENAME}}}}}}}}|db}})) and (Event.Country!='Slovenia') and to_char(coalesce(Event.End,Event.Start),'YYYYMMDD') < '{{#timel:Ymd|{{CURRENTDATE}}}}' | ||
+ | | #limit = 150 | ||
+ | | #orderby = Event.Start DESC}} | ||
+ | | first = <div class="events-title">Past Events</div><ul class="events"> | ||
+ | | each = {{#eval:wrap|{{{template|ListEvent}}}}} | ||
+ | | last = </ul>{{#eval:html|<a class="show-more-events more_go">Show more</a>}}}}</div> |