Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_event
Commits
0e3348f2
Commit
0e3348f2
authored
Jul 20, 2018
by
l26yan
Browse files
ISTWCMS-2636 Add location adress
parent
ee84b5c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/node--uw-event.tpl.php
View file @
0e3348f2
...
...
@@ -127,7 +127,58 @@
hide
(
$content
[
'field_event_location'
]);
print
render
(
$content
);
?>
<?php
print
render
(
$content
[
'field_event_location'
]);
?>
<?php
$loc_address
=
'<div class="field field_event_location">'
;
if
(
isset
(
$content
[
'field_event_location'
][
'#title'
]))
:
$loc_title
=
'<div class="field-label">'
.
$content
[
'field_event_location'
][
'#title'
]
.
'</div>'
;
$loc_address
.
=
$loc_title
;
endif
;
$location
=
$content
[
'field_event_location'
][
'#object'
];
$loc_address
.
=
'<div class="field-data"><div class="field-item-switch"><div class="field-item"><div class="location vcard"><div class="adr">'
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'name'
]))
:
$loc_address
.
=
'<span class="fn">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'name'
]
.
'</span>'
;
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'city'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'province_name'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'postal_code'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'country_name'
]))
:
$loc_address
.
=
'<div class="address-content">'
;
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'street'
]))
:
$loc_address
.
=
'<div class="street-address">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'street'
]
.
'</div>'
;
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'city'
]))
:
$loc_address
.
=
'<span class="locality">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'city'
]
.
'</span>, '
;
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'province'
]))
:
$loc_address
.
=
'<span class="region">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'province'
]
.
'</span>'
;
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'postal_code'
]))
:
$loc_address
.
=
' <span class="postal-code">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'postal_code'
];
endif
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'country_name'
]))
:
$loc_address
.
=
'<div class="country-name">'
.
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'country_name'
]
.
'</div>'
;
endif
;
$loc_address
.
=
'</div></div></div></div></div></div>'
;
if
(
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'city'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'province_name'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'postal_code'
])
||
isset
(
$location
->
field_event_location
[
LANGUAGE_NONE
][
0
][
'country_name'
]))
:
$loc_address
.
=
'</div></div></div></div></div></div></div>'
;
endif
;
print
$loc_address
;
print
render
(
$content
[
'field_event_location'
]);
?>
</div>
<?php
endif
;
?>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment