Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » article popup

#1 2006-08-02 12:43:14

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

article popup

Within the txp-site of a client I need to link some articles as popup links.

Here the whole scenario:
Within the site there is information about elections.
There is an article containing a list of candidates for community elections.
I have coded it as a list, each list item containing
a) a thumbnail with poplink to the full image, and
b) a name, linked to a full-information-article.
This list is layouted as a gallery (float left images and names like captions).
Example (but here, the link to the article is missing, because it doesn’t yet function as it should. -See a full-information-article, lacking “full” information, here

Now my client doesn’t want to open the full-information-article in the same windows (as all other articles), because the list then is left and the user has to go back,
but to open it as a popup – so that the list can still be seen behind the popup.
Within the popup there should be the content of the full-information-article WITH the chance to leave comments etc. (the rest of site design, navigation and so on could be left out).

So in this case it seems reasonable to me to work with a popup article.
But how to achieve it?

I tried working with text in captions and gallery plugins. But of course then there is no comment input etc.

I could of course build an entirely new section, containing the list on one half and full-articles on the other half of the page.
(Not a bad solution from the view of design),
- but now I’m interested in the way to get popup articles – so I might have to choose from two possibilities.

Has anyone a solution? Or is it even possible with txps built in functions?

Last edited by saccade (2006-08-02 16:04:09)

Offline

#2 2006-08-02 13:28:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: article popup

The template for the kvkandidat section could perhaps be done like this:

<pre><code>&lt;html&gt;
add parts of the design here that appear on both article list page and full article page.
&lt;txp:if_article_list&gt; add navigation and design here that is shown only in the article list page &lt;txp:article listform=“article_list” /&gt; /* shows list of articles */
&lt;/txp:if_article_list&gt;
&lt;txp:if_individual_article&gt; &lt;txp:article form=“article_full” /&gt; /* shows individual article */ add comment tags here as well
&lt;txp:/if_individual_article&gt;
more common design here
&lt;/html&gt;
</code></pre>

I’m not sure how you create the list of kandidat images (automatic of manually?), but a popup link to the full article can be done like this:
<code><a href=“URL” onclick=“window.open(‘http://url_to_full_article’, ‘full_article’, ‘scrollbars=yes’); return false”>linktekst</a></code>

See <a href=“http://www.ricocheting.com/js/popup.html”>http://www.ricocheting.com/js/popup.html</a> for more window.open options

Offline

#3 2006-08-02 14:58:34

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

Re: article popup

@ruud
Thank you very much!

This solution helps, but it implies a lot of code.

Because I want to have the site very usable for people who don’t know any html/javascript I would be interested in a solution, that maybe uses a plugin so for example a popup link could be done using something like the following:

<code><txp:xxx_popup_link articleID=”##” >Linktext</txp:xxx_popup_link></code>

or “url=…” instead of articleID

(ok, it is not too much smaller, but I can explain it better to users and it is the same principle as <code><txp:image …></code> and the other tags.

Last edited by saccade (2006-08-02 14:59:36)

Offline

  1. Index
  2. » Archives
  3. » article popup

Board footer

Powered by FluxBB