Difference between revisions of "Template:EventsForThisPage"
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{{fld=Event.{{ucfirst:{{{field|Related}}}}}}}} | + | {{{fld=Event.{{ucfirst:{{{field|Related}}}}}}}}{{{pg={{{page|}}}}}}{{#arr:dataloop |
− | {{{pg={{{page|}}}}}} | ||
− | {{#arr:dataloop | ||
|{{#data:select | |{{#data:select | ||
| Event.# | | Event.# | ||
Line 11: | Line 9: | ||
|[[Search_Events|Events {{#if:{{{pg|}}}| {{{pg|}}}|abroad}}]] | |[[Search_Events|Events {{#if:{{{pg|}}}| {{{pg|}}}|abroad}}]] | ||
}}}} | }}}} | ||
− | </div>}} | + | </div>}}<div> |
− | |||
− | <div> | ||
{{#arr:dataloop | {{#arr:dataloop | ||
|{{#data:select | |{{#data:select | ||
Line 30: | Line 26: | ||
| #limit = 150 | | #limit = 150 | ||
| #groupby = 1,2,3,4,5,6,7,8,9 | | #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}}}}' | + | | #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 | | #orderby = Event.Start ASC | ||
}} | }} | ||
| first = <ul class="events"> | | first = <ul class="events"> | ||
| each = {{#eval:wrap|{{{template|ListEvent}}}}} | | each = {{#eval:wrap|{{{template|ListEvent}}}}} | ||
− | | last = </ul><a | + | | last = </ul>{{#eval:html|<a class="show-more-events more_go">Show more</a>}} |
− | }} | + | }}{{#arr:dataloop |
− | |||
− | {{#arr:dataloop | ||
|{{#data:select | |{{#data:select | ||
| Description=Event.Description | | Description=Event.Description | ||
Line 58: | Line 52: | ||
| first = <div class="events-title">Past Events</div><ul class="events"> | | first = <div class="events-title">Past Events</div><ul class="events"> | ||
| each = {{#eval:wrap|{{{template|ListEvent}}}}} | | each = {{#eval:wrap|{{{template|ListEvent}}}}} | ||
− | | last = {{#eval:html|<a | + | | last = </ul>{{#eval:html|<a class="show-more-events more_go">Show more</a>}}}}</div> |
− | |||
− | </div> |