×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: showing address in two lines

showing address in two lines 12 years 9 months ago #12950

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
Hi Daniel,

Is there any way to add at the end of the street's name?

I am getting few postal codes cut in 2 pieces.


Thanks.

showing address in two lines 12 years 9 months ago #12979

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You are getting the postal codes in 2 lines? Then why do you want to ad a space at the end of the street name?
Can you give me a link where I can see it?

showing address in two lines 12 years 9 months ago #12988

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
Hi Daniel,

I don't want a space, i want a break line
I guess this boxes are too sensible to html code. :=D

- Go to my site
- Click on category 'Parks' (the fourth one)
- The result #4 has that problem (Bear Creek Provincial Park)

or
- Click on Restaurants, and the first result has the same problem.

Maybe for future releases could be nice if we can configure the way we wanna show the address
For example, If we enter the following fields:


You can create another field where we can introduce our own format, something like:


where:
, will mean 'same line', and
; will mean 'start next line'.

What do you think?

In that way, you won't have to worry about address formats never again.

showing address in two lines 12 years 9 months ago #12992

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
The only one who worries about street formats is you :)
I again propose to use template overrides - one time set, it won't ever change!
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

showing address in two lines 12 years 9 months ago #13031

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
The traditional way to use 'template overrides' for hotspots is not working.

Copying or Creating Layout Files

The rhuk_milkyway template does not have any layout overrides for any modules. If we want to override the default layout for Latest News module, we need to copy this file:
/modules/mod_latest_news/tmpl/default.php

to this location, creating the approriate directories in the event they don't already exist:
/templates/rhuk_milkyway/html/mod_latest_news/default.php

showing address in two lines 12 years 9 months ago #13033

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
It works, but it is a little bit tricky :)

In your template folder create:
html/com_hotspots/json/
copy list_description.php in it and change line 14 to:
<?php require(JPATH_THEMES . DS .'YOUR_TEMPLATE_FOLDER/html/com_hotspots/json/default_one_line_address.php'); ?>
 
and also copy default_one_line_address.php (from the components/com_hotspots/views/hotspots/tmpl folder) to the same folder.
now make your modifications in default_one_line_address.php and it should work...
Daniel

showing address in two lines 12 years 9 months ago #13036

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You will also need to copy the list.php from the json view.
Daniel

showing address in two lines 12 years 9 months ago #13039

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
Hi Daniel,

default_one_line_address.php doesn't exist in that folder: components/com_hotspots/views/hotspots/tmpl



the file is in the folder: components/com_hotspots/views/hotspot/tmpl

the difference is hotspot vs hotspots. Is that the file?

showing address in two lines 12 years 9 months ago #13048

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yes, that is the file. I'm sorry...

showing address in two lines 12 years 9 months ago #13050

  • Eliecer Marchante
  • Eliecer Marchante's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 493
  • Karma: 11
  • Thank you received: 13
if i want to modify Hotspots.js without change the original file, Do I have to drop the file to the same folder?

showing address in two lines 12 years 9 months ago #13089

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Well, generally Hotspots.js has to be moved to save location. it can be in the template overrides folder or somewhere on your website. Most important that you change the path to the file in the override.
  • Page:
  • 1
Time to create page: 0.120 seconds