Title on markers
-
- Phoca Newbie
- Posts: 8
- Joined: 04 Jan 2010, 14:48
Title on markers
Hello, its any way to take off the title of the markers?? Or make them smallers??? Thanks
- Jan
- Phoca Hero
- Posts: 48743
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Title on markers
Hi, this can be customized in the code, there is no option for this
but you can e.g. paste as title empty char like which will cause not displaying the title in the marker.
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 04 Jan 2010, 14:48
Re: Title on markers
The   worked out but it leaves a big gap and it doesnt look nice. If you can tell me wich part of the code should I remove to take the title off would be great. Thanks a lot for your help
-
- Phoca Newbie
- Posts: 3
- Joined: 20 Dec 2009, 18:52
Re: Title on markers
Hi to reduce the size of the title of the marker, simply edit the file
/components/com_phocamaps/views/map/tmpl/default.php
the line 127 is
and change the H1 tag, for example to
Save the file, reload the page and your title is now smaller...
p.s. Thank's phoca for this other great extension
http://www.divemauro.it
/components/com_phocamaps/views/map/tmpl/default.php
the line 127 is
Code: Select all
$text = '<h1>' . addslashes($markerV->title) . '</h1>';
Code: Select all
$text = '<h4>' . addslashes($markerV->title) . '</h4>';
p.s. Thank's phoca for this other great extension
http://www.divemauro.it
-
- Phoca Newbie
- Posts: 2
- Joined: 17 Aug 2010, 08:07
Re: Title on markers
I found this thread very helpful and would like to make this small contribution.daajestaa wrote:To edit the style of the Marker Title, simply create a custom H1 class and add it to the PHP file;
1. Locate the file plugins/content/phocamaps.php
2. Around line 367, locate the code3. Edit the h1 tag to add a custom class e.g. <h1 class="MarkerTitle">$text = '<h1>' . addslashes($markerV->title) . '</h1>';
4. Locate the CSS file at components/com_phocamaps/assets/phocamaps.css
5. Add the custom h1 class you created to this file
You will now be able to style the Marker title as you like - including the height/size etc. If you want to remove this completely, simply comment out this line.
My preference is to be able to style the title of the marker, as well as the rest of the marker details, using the marker description box. This makes it easy to have different styling, e.g. colours, for different markers on the same map.
I do this by commenting out the code line that sets the title style in the phocamaps.php file, as daajestaa suggested in the last sentence. With that done, I only need to include in-line styling of the title in the marker description box when I want to change styles. This avoids having to make further changes to the PHP code and CSS style sheets.
However, when you comment out the PHP code line that sets the marker title style in the phocamaps.php file, you must also make a change to the code line that follows it. These two lines are:
Code: Select all
$text = '<h1>' . addslashes($markerV->title) . '</h1>';
$text .= '<div>'. PhocaMapsHelper::strTrimAll(addslashes($markerV->description)).'</div>';
Code: Select all
/* $text = '<h1>' . addslashes($markerV->title) . '</h1>'; */
$text = '<div>'. PhocaMapsHelper::strTrimAll(addslashes($markerV->description)).'</div>';