Not sure how this can be done. I have read through the forums and I did not find anything that I can use correctly.
In the tree module I want to take out the top "galleries" and only see the category as the top with subcategories under it.
you can see the link here. http://redtalkersgallery.com/index.php/ ... ca-gallery
instead of seeing galleries at the top I want to only see Artist.
Thank you
Tree Module menu
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Tree Module menu
Hi,
To hide the part of the site, you can use CSS but it is not so easy, as the ID of this part changes dynamically.
The module includes random ID because of not conflict with another instances of the module (dTree is commonly used, e.g. by VirtueMart, etc.) And of course more instances of one module can be displayed on the site, so this is why there is random ID. Because of this it has dynamic ID (see historical posts in this forum where users had conflicts with different instances of dTree menu).
So the easiest way is to directly customize the module (it cannot be done per override method because it is not output file - modules/mod_phocagallery_tree/tmpl/default.php can be overriden as it is output file, modules/mod_phocagallery_tree/mod_phocagallery_tree.php cannot).
See the code here:
modules/mod_phocagallery_tree/mod_phocagallery_tree.php
Just change this string:
FROM:
TO:
and save the file.
Now you can access the part with CSS and you can hide it.
1) you can backup this file or store the edit instruction somewhere, so while upgrade, you can compare your edited file with new one and correct it or directly you can make this customization to newly upgraded file. I suppose, there will be no changes in dTree (as it is really stable for some years) so maintaining this code will be not difficult.
2) don't forget that with this customization, you can access the part by ID, so it fits your needs (CSS access) but you should create only one instance of this module - not more, so there will be not more than one ID you have set - no conflicts on the site.
Jan
To hide the part of the site, you can use CSS but it is not so easy, as the ID of this part changes dynamically.
The module includes random ID because of not conflict with another instances of the module (dTree is commonly used, e.g. by VirtueMart, etc.) And of course more instances of one module can be displayed on the site, so this is why there is random ID. Because of this it has dynamic ID (see historical posts in this forum where users had conflicts with different instances of dTree menu).
So the easiest way is to directly customize the module (it cannot be done per override method because it is not output file - modules/mod_phocagallery_tree/tmpl/default.php can be overriden as it is output file, modules/mod_phocagallery_tree/mod_phocagallery_tree.php cannot).
See the code here:
modules/mod_phocagallery_tree/mod_phocagallery_tree.php
Just change this string:
FROM:
Code: Select all
$treeId = "d".uniqid( "tree_" );
Code: Select all
$treeId = "dPhocaGalleryTree";
Now you can access the part with CSS and you can hide it.
1) you can backup this file or store the edit instruction somewhere, so while upgrade, you can compare your edited file with new one and correct it or directly you can make this customization to newly upgraded file. I suppose, there will be no changes in dTree (as it is really stable for some years) so maintaining this code will be not difficult.
2) don't forget that with this customization, you can access the part by ID, so it fits your needs (CSS access) but you should create only one instance of this module - not more, so there will be not more than one ID you have set - no conflicts on the site.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 06 Nov 2012, 06:07
Re: Tree Module menu
Why a core hack?
Create an override named default.php in your template folder
/templates/YOURTEMPLATENAME/html/mod_phocagallery_tree/default.php
Paste following code in it:
Don't like JQuery? So, use this override code using CSS in file above instead:
Create an override named default.php in your template folder
/templates/YOURTEMPLATENAME/html/mod_phocagallery_tree/default.php
Paste following code in it:
Code: Select all
<?php
defined('_JEXEC') or die;
?>
<div id ="phocagallery-tree-module">
<center><?php echo $output ?></center>
</div>
<div style="clear:both"></div>
<script>
(function($){
$(document).ready(function(){
$("#phocagallery-tree-module .dTreeNode").first().css("display", "none");
}); //document ready
})(jQuery);
</script>
Code: Select all
<?php
defined('_JEXEC') or die;
?>
<div id ="phocagallery-tree-module">
<center><?php echo $output ?></center>
</div>
<div style="clear:both"></div>
<style>
#i<?php echo $treeId; ?>0 {
display:none;
}
#s<?php echo $treeId; ?>0 {
display:none;
}
</style>
-
- Phoca Newbie
- Posts: 4
- Joined: 27 Mar 2016, 21:38
Re: Tree Module menu
So if I am getting this correct I can only do it for one menu, i.e. Artist. Where I will have 6 or 7.
Artist
Different Artist
Themes
Different Themes
Landscape
Different Landscape
and so forth. Each one will have it's own menu with sub menus under it.
Artist
Different Artist
Themes
Different Themes
Landscape
Different Landscape
and so forth. Each one will have it's own menu with sub menus under it.
-
- Phoca Newbie
- Posts: 4
- Joined: 27 Mar 2016, 21:38
Re: Tree Module menu
ok just tried it with the default.php and it work perfect. Thank you illovo!!
Is there a light box that works with mobile phones and tablets? I have tried them all and not really looking good. Beside that everything works perfect!
Is there a light box that works with mobile phones and tablets? I have tried them all and not really looking good. Beside that everything works perfect!
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Tree Module menu
Hi, in Phoca Galley more lightboxes can work in mobile or you can use no popup - for example, the Magnific (image only) method is responsive so for mobile recomended.
Jan
Jan
If you find Phoca extensions useful, please support the project
- pomsuay
- Phoca Newbie
- Posts: 1
- Joined: 02 Apr 2016, 09:45
- Location: thailand
- Contact:
Re: Tree Module menu
Thank you