+ Reply to Thread
Results 1 to 4 of 4

Thread: { location } location tag

  1. #1
    Senior Member
    Join Date
    Aug 2014
    Posts
    109

    { location } location tag

    Hi,

    I use the
    Code:
    Only registered members can view the code.
    tag in title meta tags, which works great for SEO.
    My site locations are worldwide, so I have Country, State, City in the location tag available.

    At the moment if I'm browsing listings in say Sarasota. My tag will return: United States, Florida, Sarasota.

    If I'm browsing a City, I would like my tag to just show: Florida, Sarasota or Sarasota.
    If I'm browsing a State, I would like the tag to show: United States, Florida or Florida.
    If I'm browsing a Country, then: United States.


    The ideal length for the meta title is 50–60 characters. If the full Country, State, City is used there isn't any space left for the rest of the page title.
    Can anyone suggest a solution?

    Cheers

  2. #2
    Senior Member
    Join Date
    Aug 2014
    Posts
    109
    Hi, can anyone suggest a solution or coding to achieve the above?
    Cheers

  3. #3
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,217
    Hello,

    You can use location variables like that:

    {if location} in {if location_level3}{location_level3}, {/if}{if location_level2}{location_level2}, {/if}{location_level1}{/if}

  4. #4
    Junior Member
    Join Date
    Jan 2022
    Posts
    12
    This works up to location4:
    Discover the best apartments {if location}{if location_level2}{if location_level3}{if location_level4}in {location_level4},*{location_level3}, {location_level2}{else}in {location_level3}, {location_level2}{/if}{else}in {location_level2}{/if}{else}in {location_level1}{/if}{/if} for a short stay!


    The thing is, when i am inside 4th or 3rd level of the location, i don't want to include Kassandra, halkidiki, i want to have only Polychrono (4th level).

    Discover the best apartments in Polihrono, Kassandra, halkidiki for a short stay!

    If i remove location 3 and 2 in the condition for the 4th level, on front end the conditions are rendered literally {if location_3) etc...


    Any advice please?
    Thanks!

+ Reply to Thread