PDA

View Full Version : Show/hide a gallery category


seeker
Sep-04-2007, 05:27 AM
So my site ( http://www.knappimaging.com ) is *finally* up and running. Thanks so much to everyone on the SmugMug team who helped out by answering questions, tweaking settings, etc. over the past months :)

Now I have another question ... ;)

I want to have a separate section on the site that is dedicated to clients; that is, I want (I believe) a gallery category called "clients" and I want it to show up by itself on a page linked to a nav button that I will create shortly. I want all the other galleries with the exception of this one to show up on my existing galleries page.

I am not quite sure how to accomplish this ... any thoughts?

- Brian

Allen
Sep-04-2007, 05:56 AM
So my site ( http://www.knappimaging.com ) is *finally* up and running. Thanks so much to everyone on the SmugMug team who helped out by answering questions, tweaking settings, etc. over the past months :)

Now I have another question ... ;)

I want to have a separate section on the site that is dedicated to clients; that is, I want (I believe) a gallery category called "clients" and I want it to show up by itself on a page linked to a nav button that I will create shortly. I want all the other galleries with the exception of this one to show up on my existing galleries page.

I am not quite sure how to accomplish this ... any thoughts?

- Brian
Creating a category named "clients" and linking directly to it with the nav
will work great. Then with the following javascript hide it from the
homepage/galleries page. Make sure you have categories displayed on the
galleries page.


Place this in your footer section. Reference this post (http://www.dgrin.com/showpost.php?p=490934&postcount=25).

<script type="text/javascript" language="javascript">

function delCategory() {
re = /\/(clients)$/;

var oList = YD.getElementsByClassName('miniBox', 'div', this);

for (i = 0; i < oList.length; i++) {
if (re.test(oList[i].getElementsByTagName('a')[0].href))
oList[i].parentNode.removeChild(oList[i]);
}
}
YE.onContentReady('categoriesBox', delCategory);

</script>