XF 2.1 Trying to show location in user pane but...

beerForo

Well-known member
I edit the phrase Location, so it is blank. I just need the actual location not the word Location.

Mary
Florida

BUT the colon is left there, ex:

Mary
: Florida

Any help? Thanks
 
Last edited:
I removed it from the message_macros template, and somehow the word and colon are still there?!

Code:
before
                                <xf:if is="$xf.options.geoLocationUrl">
                                    <a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                                <xf:else />
after                           
                                <xf:if is="$xf.options.geoLocationUrl">
                                    <a href="{{ link('misc/location-info', '', {$user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
                                <xf:else />
 
Would anyone be able to assist? Just getting template errors.

The goal is:
1. Remove the phrase Location, only from user pane.
2. Also remove colon.
3. Left align or center the result (their location), since the phrase is now gone and it is floating on the right.

Thanks!
 
Try
PHP:
                    <xf:if is="$xf.visitor.Profile.location AND $xf.options.geoLocationUrl">
                        <dl class="pairs pairs--justified fauxBlockLink">
                            <dt class="is-sentence"></dt>
                            <dd>
                                <a href="{{ link('misc/location-info', '', {'location': $xf.visitor.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$xf.visitor.Profile.location}</a>
                            </dd>
                        </dl>
                    </xf:if>
 
Back
Top Bottom