Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-07 15:35:35

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

SOLVED Use Fancybox in Conjunction with Article Custom

http://fancybox.net/

I’m trying to use the Inline modal window option in Fancybox to achive the following:

1. Display a list article excerpts each in its own DIV
2. When a DIV is clicked invoke Fancybox to display the articles title and body.

The problem I’m having is by using the hidden class (see code below) Texpattern only displays the first article excerpt. If I remove the hidden class all the articles along with their excerpts and bodies are displayed.

Does anyone have any suggestions?

Many thanks.

CSS
.hidden { display: none; visibility: hidden; }

Default Page
<txp:article_custom form="dates" section="information" limit="9999" />

Date Form
<!-- Summary -->
<div class="box">
<a class="pop" href="#<txp:article_url_title />"><h1><txp:title /></h1><p><txp:excerpt /></p></a>
</div>

<!-- Full Details -->
<div class="hidden">
<div id="<txp:article_url_title />" class="popup-box">
<h1><txp:title /></h1>
<p><txp:body /></p>
</div>
</div>

Last edited by Algaris (2011-01-10 10:13:25)

Offline

#2 2011-01-10 09:04:35

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

Re: SOLVED Use Fancybox in Conjunction with Article Custom

Okay, I’ve ascertained that the problem is unrelated to Fancybox as that side of things is working as expected. As I mentioned the problem appears to be with using the .hidden class.

What I’m trying to figure out is why using the .hidden class hides all the articles after the first one has been displayed.

Offline

#3 2011-01-10 09:33:28

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: SOLVED Use Fancybox in Conjunction with Article Custom

a link to your site might help so we can see whats going on

Offline

#4 2011-01-10 09:46:49

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

Re: SOLVED Use Fancybox in Conjunction with Article Custom

That’s odd. It’s showing up in Firefox but not IE, Safari, or Chrome.

How strange. I’ve managed to get it working by removing my comments. I’m not sure yet why that would be causing a problem.

Last edited by Algaris (2011-01-10 10:01:41)

Offline

#5 2011-01-10 10:01:20

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

Re: SOLVED Use Fancybox in Conjunction with Article Custom

Got it. The code contained in the hidden DIV tag had the following comments (Stripped out of the code I posted here for simplicity):

<!-- </txp:article_url_title> -->
<!-- </hidden> -->

When I removed them everything worked as it should. Maybe it’s a Fancybox quirk or perhaps Textpattern, I’m not sure but it didn’t like having comments with the the hidden DIV.

More specifically it seemed to have a problem with the < and > contained within my comments.

Last edited by Algaris (2011-01-10 10:11:15)

Offline

#6 2011-01-10 10:06:07

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: SOLVED Use Fancybox in Conjunction with Article Custom

Cool :)

Offline

Board footer

Powered by FluxBB