PDA

View Full Version : Duplicate Homepage


gundog
Mar-08-2008, 03:20 PM
When creating a duplicate Homepage from the instructions it says:

For the Galleries page we are going to use one of Devbobo's (http://www.dgrin.com/member.php?u=1150) tricks. See the dgrin thread here (http://www.dgrin.com/showthread.php?p=355505#post355505).

What it does, in short, is it duplicates the homepage, but makes it separately adressable for us.



Add this to your Javascript:

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

Is that the Header Java Script, the Footer Java Script or some other Java Script?



Thanks,
Al

denisegoldberg
Mar-08-2008, 03:32 PM
Add this to your Javascript:

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

Is that the Header Java Script, the Footer Java Script or some other Java Script?
I have mine in the footer javascript, and everything seems to be working fine. Based on that - I believe it will work in either place, but the footer is probably preferable if it works there.

--- Denise

gundog
Mar-08-2008, 04:36 PM
I have mine in the footer javascript, and everything seems to be working fine. Based on that - I believe it will work in either place, but the footer is probably preferable if it works there.

--- Denise

Thanks - I'll try that.

When creating this 'duplicate' home page are we also creating the same for the other Navbar pages: About Us, Pricing etc?

And as I am putting a sponsor logo and link to thier site on the Galleries page - this won't transfer to all other pages (undesirable)?

denisegoldberg
Mar-08-2008, 04:59 PM
When creating this 'duplicate' home page are we also creating the same for the other Navbar pages: About Us, Pricing etc?

The other entries on the navbar are usually direct to galleries. For example, on my site my Kaleidcope, About, and Guestbook pages are all galleries. Well actually, my Gallery page is too because I wanted a slightly different look than the standard galleries page.

--- Denise

Allen
Mar-08-2008, 05:04 PM
Thanks - I'll try that.

When creating this 'duplicate' home page are we also creating the same for the other Navbar pages: About Us, Pricing etc?

And as I am putting a sponsor logo and link to thier site on the Galleries page - this won't transfer to all other pages (undesirable)?
Take this out of your javascript and put in your footer.

<script> (http://www.dgrin.com/)
if (hasPath("galleries"))
(http://www.dgrin.com/)YD.addClass(document.body, "galleries");
</script>

gundog
Mar-08-2008, 08:13 PM
The other entries on the navbar are usually direct to galleries. For example, on my site my Kaleidcope, About, and Guestbook pages are all galleries. Well actually, my Gallery page is too because I wanted a slightly different look than the standard galleries page.

--- Denise

If your pages are Galleries...what page did you put your gallery on to begin with? i.e. Where on your site did you create the gallery?

gundog
Mar-08-2008, 08:17 PM
Take this out of your javascript and put in your footer.

<script>
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
</script>

Allen - you are suggesting that I NOT do what Denise suggested (I have already done it but can take it out) but rather put this code in my footer box? If that is the case...why would that not have been in the customization FAQ instructions? As earlier posted it just said to insert that code in my "java script".

Allen
Mar-08-2008, 08:23 PM
If your pages are Galleries...what page did you put your gallery on to begin with? i.e. Where on your site did you create the gallery?
Each of those are private galleries that will not show on any browse page
like in a category or subcategory box. The direct link is the only way to
access them.

You can created a category called "site stuff". All my html type galleries
that need a direct link and are private are under it. There is also a gallery
called site files where I have my banner and any site images. Keeps the
admin stuff separate from all my galleries.

The dup homepage called galleries is a browse type page with the
category/gallery box.

Clear as mud yet? Keep asking questions, we'll get you there eventually.

gundog
Mar-08-2008, 08:24 PM
Ok - so I followed all the instructions and pasted all the code to create a duplicate page. I can't see that I have one or am getting to it. How would I know anytghing I did stuck - or was right? It would look the same as the page I was leaving.

gundog
Mar-08-2008, 08:28 PM
Each of those are private galleries that will not show on any browse page
like in a category or subcategory box. The direct link is the only way to
access them.

You can created a category called "site stuff". All my html type galleries
that need a direct link and are private are under it. There is also a gallery
called site files where I have my banner and any site images. Keeps the
admin stuff separate from all my galleries.

The dup homepage called galleries is a browse type page with the
category/gallery box.

Clear as mud yet? Keep asking questions, we'll get you there eventually.

Allen - lol...thanks for trying to help me but every time I ask a question to get clarity I get an answer that 3 times confuses me.

I am sorry - I have no clue what you are saying in that post.

Allen
Mar-08-2008, 08:32 PM
Ok - so I followed all the instructions and pasted all the code to create a duplicate page. I can't see that I have one or am getting to it. How would I know anytghing I did stuck - or was right? It would look the same as the page I was leaving. Looks like the code is working, just have to get your links fixed.
This is the link to the galleries page.
http://www.gundogphotos.smugmug.com/galleries

In your header replace this below and you'll be off to a good start. When you do
create the new galleries like guestbook replace the xxxxxxxx_xxxxx with the
gallery number.


<div id="navcontainer">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/galleries">My Galleries</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Contact Us</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">About Us</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Guestbook</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Pricing</a></li>
</ul>
</div>

gundog
Mar-08-2008, 08:45 PM
Looks like the code is working, just have to get your links fixed.
This is the link to the galleries page.
http://www.gundogphotos.smugmug.com/galleries

In your header replace this below and you'll be off to a good start. When you do
create the new galleries like guestbook replace the xxxxxxxx_xxxxx with the
gallery number.


<div id="navcontainer">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/galleries">My Galleries</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Contact Us</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">About Us</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Guestbook</a></li>
<li><a href="/gallery_xxxxxxxx_xxxxx">Pricing</a></li>
</ul>
</div>

Allen - this is what I have in there now:
<li><a href="/gundogphotos.smugmug.com">Galleries</a></li>

Are you saying it should be:
http://www.gundogphotos.smugmug.com/galleries

gundog
Mar-08-2008, 09:07 PM
If your pages are Galleries...what page did you put your gallery on to begin with? i.e. Where on your site did you create the gallery?

Let me ask this another way.

Do I need to create a 'Gallery' to actually create a Galleries Page? I am using the duplicate page for the Gallery Page.

Allen
Mar-09-2008, 05:35 AM
Let me ask this another way.

Do I need to create a 'Gallery' to actually create a Galleries Page? I am using the duplicate page for the Gallery Page.
Looks like you got the nav fixed and the links work.:thumb

gundog
Mar-09-2008, 07:43 AM
Allen - thanks for the help - you got me in the right direction and a big assist from Rich was huge. Thanks - you know there will be more questions. They are more fun to ask 1 or 2 at a time versus 12! :cry