Sending blog info to pop-up windows
Posted: 21 October 2004 09:44 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  191
Joined  10-12-2003

I have a blog page and I’d like to create links that go to either an iFrame or popup window and display info from some of the blog tags such as {summary}, etc. My problem is that I don’t know how to construct a url so that the popup window knows it should display info from the blog page the link was on.

I assume it has something to do with creating a variable but I don’t know how to successfully pass the blog info around, especially when I have many blogs that a user can choose from on the home page.

If I had just one blog with may categories I suppose this would be simpler, but due to the nature of my site I decided that using many blogs made more sense.

Any help is appreciated. Thanks.

 Signature 

Peter Dinesen
Dinesen-Schacht
http://iSawYou.com

Profile
 
 
Posted: 21 October 2004 12:15 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

If you’re asking how to make the target of a link (i.e. the page where the link points) open in a specific frame or window, then what you want to look at is the “target=” attribute of the link tag.  For instance:

<a href="http://www.example.com/" target="popup">Example</a>

That would make the example.com site open in whatever window or frame was named “popup”.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 21 October 2004 02:24 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  191
Joined  10-12-2003

Chris

Let me rephrase the question:

I’m showing a blog on a web page. I want to design the page so I can show the {summary} field, or any other field from the blog, in a popup window (or iFrame) that opens from a link on the original blog page.

I know how to make the popup window just fine wink What I don’t know how to do is to get the {summary} tag to actually display the summary info for that blog in the popup window. Currently it just shows the tag “{summary}” without actually displaying the text in the database field for that weblog entry.

I hope this explains it better, please let me know if you’d like to see an example.

Thanks.

 Signature 

Peter Dinesen
Dinesen-Schacht
http://iSawYou.com

Profile
 
 
Posted: 21 October 2004 04:03 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

You… display it just like you would display it in any Template in EE.  Something like:

{exp:weblog:entries weblog="yourweblog" limit="1"}
{summary}
{
/exp:weblog:entries}

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 21 October 2004 04:42 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  191
Joined  10-12-2003

Chris, thanks, I got that part now but there is still one big chunk of this I’m not yet grokking.

How do state in this tag which weblog I want to display the summary for? In your example the name of the blog is stated as text, not a variable

{exp:weblog:entries weblog=“yourweblog” limit=“1”}.

Other than hand coding a different template for all the dozens of blogs I have I assume there is a way to embed the name of the blog into the url on the original page so I can put that variable in this tag so the correct summary is displayed. That’s what I don’t know how to do.

Passing the name of the weblog around so it can be used in tags like this is obviously the way to do it but I just can’t figure it out. Sorry for being so dense.

Thanks

 Signature 

Peter Dinesen
Dinesen-Schacht
http://iSawYou.com

Profile
 
 
Posted: 21 October 2004 04:48 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  33269
Joined  05-14-2004

Could you use the snippets plugin to pass the variables to the popup?

 Signature 
Profile
MSG
 
 
Posted: 21 October 2004 05:41 PM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23744
Joined  05-20-2002

I think they’re asking for the permalink tag?

So on your main page where you have a bunch of titles from a variety of weblogs, you’d have:


{exp:weblog:entries }
{title} - <a href=”{permalink=“weblog/popup”}” target=“popup”>Read more</a>
{/exp:weblog:entries}

And on the ‘popup’ template you’d have the code Chris posted, though if you are going to have multiple weblogs using the same ‘popup’ template, you can ditch the specification of the weblog:

{exp:weblog:entries limit=“1”}
{summary}
{/exp:weblog:entries}

Basically, you want a url going to the ‘popup’ page that contains either the entry ID or the url_title of a specific article- you really don’t have to specify the weblog- there are no duplicate entry ID’s or anything.  The permalink and url_title tags should give you the correct url.

IF I understood correctly!

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 21 October 2004 07:23 PM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

Yep, I think rob1 has got it there.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 23 October 2004 04:05 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  191
Joined  10-12-2003

Thanks everyone. I’m not sure if I’m there quite yet but I’ll keep plugging at this one. Hopefully I’ll get that aha! moment.

 Signature 

Peter Dinesen
Dinesen-Schacht
http://iSawYou.com

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66392 Total Logged-in Users: 32
Total Topics: 84720 Total Anonymous Users: 18
Total Replies: 454706 Total Guests: 198
Total Posts: 539426    
Members ( View Memberlist )