|
Hello!
I'm trying to code my page such that on a project or page, the tags will bring them back to the index page (page with thumbnails) with the appropriate tag highlighted. I'm sure there is a way to do this but I'm a java + php beginner and can't figure it out. Any mini pointers will be very helpful thanks! http://shiunji.byethost9.com/corecms/Core/ |
|
Hey - so I've managed to do it now by using div layers - but this gives rise to a mini bug.
The tags work as advertised, however, when I am on project A, & I access a tag to take me back to the index page, the link to project A is deactivated from the index page, and I can't access it until I click on another project. Everything else works fine. Is there a way to get round this? |
|
Any information you can give on this would be helpful. I would like similar functionality for my Core install.
|
|
I did it mainly by manipulating z-indices and absolute positioning.
I overcame the all tag bug by creating a new tag 'All' and tagging everything with it manually. However, I still don't know how to solve the problem of the deactivated project. :/ Any pointers will be good! |
|
The problem with both of our custom themes is that we removed the thumbnails from the gallery pages themselves. If we had left them the tags would still work. Given that the gallery pages are loaded via ajax in the same window the tags no longer work in the gallery because there is nothing for them to work on. I am guessing that we could alter the jquery.corefunctions.js file to have it check if the current page is the designated home page (there is already a function set up for this in Core), if it is then the tags function normally. If not, then the some additional script alters the way the tags function so as to bring you home with the tags loaded. This may be accomplished with a actual page reload or maybe a better coder might be able to do this and preserve the ajax page loads. It's just a thought. I'm assuming it's completely possible just outside the scope of my abilities. Let me know if you get it working though.
Sidenote: nice trick with the position:absolute and white background to hide your thumbnails. You might be on to something with that. Update: The way you have set up each gallery page is pretty nice. In theory you should be able to use the same idea I said above to simply fadeOut and remove the entry div that was loaded. Thus revealing your cleaverly hidden thumbnails. And if you remove all your previous code to make the tags link to index with the tags loaded then you should notice that the tags when clicked in the gallery will have highlighted the appropriate thumbnails. Was that clear? Again not a solution but a direction to head in. Hope it helps. |
|
Hmn.
I got my tags working by using "close-entry" class on all tags, but still, the thumbnail of the project that was last clicked on prior to clicking on a tag does not work. <- If that make sense haha To better illustrate lets say you click project 1. then you click tag x, which loads the thumbnails again. then you click project 1 - and the page won't load, but if you click project 2, 3, 4, 5, or tag y, z, u - everything works BUT for project 1, which you clicked first. I'm no jquery guru unfortunately - but I'm guessing somewhere in corefunctions it's been coded such that the thumbnail doesn't load the same page again since it was meant to sit under the rest of the project page? Does anyone know which / what function stops the thumbnail from working? |
|
So I got this to work perfectly. I started by setting up my page to hide my thumbnails the same way you do. That is position the gallery photos absolutely and give the container a background color. This essentially hides the thumbnails behind the gallery. I then added the .close-entry class to all my tags (just like you did). Lastly, I went into the jquery.corefunctions.js file to find how the .close-entry function worked. It turns out there is an super easy solution to your/our problem. On line 48 and 49
jQuery.latestLoad = "";
$("#load-content").html("");
$("#load-content").hide();
});I changed the #load-content to my images container div. In my case I changed it to #gallery but I'm only displaying/hiding pictures. In your case you have text and images. So wrap all the content in your entry.php file in a div. Give it a unique id and edit the code above to hide it. Should work. It does for me. Here is a working example for you. http://shaunyasaki.com/dev#26. Hope this helps.
|
|
Hmn. I can't seem to get it to work. :/
I did as you suggested & substituted my entry container for load-content in the corefunctions close-entry thing. Do I have to assign all thumbs links to be close-entry as well? |
|
:(
Really can't get it to work somehow. The all-tag works well now, but still I cant' figure out about the non-working thumbnail!!! I checked your corefunctions file, you omitted 2 lines which is currently included in the default template, but strangely when I do the same as you my tags just cease to work completely when I'm on my project page. Any ideas what I'm doing wrong? :( |
i actually made it work i think. i left the tag-all div in the index.php as it is:
<div id="tags">
<? LOAD_TAGS("LIST"); ?>
<a class="tag-all" href="#">ALL</a>
</div>
and i modified the jquery.corefunctions.js file, the tagAll function like this:
tagAll: function() {
$("#load-content").html("");
$("#load-content").hide();
$.latestLoad = "";
$(".link-active").each(function() {
$(this).removeClass("link-active");
});
$("#thumbs").show();
$(".entry-link").each(function() {
$(this).show();
});
}
and it seems to be working just fine.
hope it helps.
|
| Powered by Nabble | See how NAML generates this page |
