Difference between revisions of "Template:EventsForThisPage"
(20 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{{fld=Event.{{ucfirst:{{{field|Related}}}}}}}} | + | {{{fld=Event.{{ucfirst:{{{field|Related}}}}}}}}{{{pg={{{page|}}}}}}{{#arr:dataloop |
− | {{{pg={{{page|}}}}}} | + | |{{#data:select |
− | {{#arr:dataloop | + | | Event.# |
− | |{{#data:select | + | | #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|}}}}} |
− | | first = <div class="contact-info-title">{{#if:{{{1|}}}|<h2>{{{1}}}</h2>| | + | |[[Search_Events|Events {{#if:{{{pg|}}}| {{{pg|}}}|abroad}}]] |
− | {{#ifeq:{{{field}}}|country | + | }}}} |
− | |{{#title:link| | + | </div>}}<div> |
− | |[[ | ||
− | }}}} | ||
− | </div> | ||
− | }} | ||
− | <div> | ||
{{#arr:dataloop | {{#arr:dataloop | ||
|{{#data:select | |{{#data:select | ||
Line 36: | Line 31: | ||
| first = <ul class="events"> | | 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 | |
− | {{#arr:dataloop | + | | Description=Event.Description |
− | |{{#data:select | + | | 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> |
− | | first = <div class="events-title">Past Events</div><ul class="events"> | ||
− | | each = {{#eval:wrap|{{{template|ListEvent}}}}} | ||
− | | last = </ul> | ||
− | }} | ||
− | |||
− | </div> |