Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-08 16:33:53

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

using TXP for publication index and discussion site

Hi,

I’m working on a publication index and discussion site that will facilitate reader response and criticism for dozens (maybe hundreds) of publications. Site visitors should be able to find articles in our system based on various categories, and comment on articles. An “article” would include various kinds of metadata, including an abstract, tags, categories, author and publication information, etc.

This seems easy enough to accomplish using the txp:categories, txp:custom fields, and tags (txp:keywords)— in my prototype I’ve been using tru_tags, glz_custom_fields, and others.

However, the article data entry is a bit unwieldy, and I’d like to capture the publication metadata in a different place and be able to relate articles with their publication data and vice versa. That way, publication metadata, such as Publisher, ISSN, and Subject Category could be entered once for each publication and piped into each article associated with that publication. Then I could set up a landing page for each publication indexing articles associated with that publication.

It seems like the best way to accomplish this would be to establish a section for Publications, and each publication would be a txp:article in that section. But I’m not sure how to accomplish the interoperability between publication metadata and the associated articles.

I expect this issue has been tackled before, and I’d be grateful for any advice (or links to relevant threads) you may offer!

Thanks in advance!

kindest regards,
john stephens

Offline

#2 2008-07-08 18:21:00

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: using TXP for publication index and discussion site

This sounds like something the new tag <txp:variable /> will be able to do with ease in 4.0.7 when it is released, probably towards the end of the summer. But for now I can’t help but maybe someone else will.


BB6 Band My band
Gud One My blog

Offline

#3 2008-07-09 03:23:36

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: using TXP for publication index and discussion site

This sounds like something the new tag <txp:variable /> will be able to do with ease in 4.0.7 when it is released, probably towards the end of the summer.

Thanks, Z. I can’t delay this project that long, but 4.0.7 is looking pretty enticing.

Maybe the method I described isn’t the right way to do it. Perhaps there are simpler ways to get Textpattern to display the data?

Although I’ve been thinking of “publication title” as a custom field, it seems like I could use a category field in that each publication would have more than one article but each article would belong to only one publication. Would this help me get closer to a solution? Is it possible to build a category landing page that outputs category-specific data along with a list of articles that belong to that category? I feel like I might be halfway there if I could get Textpattern to generate a page for each publication, and output that publication’s Title, Publisher, ISSN, and categories.

The other half would be to output the right publication data on the individual article pages associated with each publication.

I searched the forum for “category landing page” but I couldn’t find anything. I’d love to hear any suggestions! Thanks again!

Offline

#4 2008-07-09 08:22:37

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: using TXP for publication index and discussion site

Not sure if understood your post correctly and might have got confused between articles in a publication (I’ll call them magazine-articles here) and txp-articles but I think you mean you want to avoid having to repeatedly input the publication information with each magazine-article.

If you use your initial suggestion of making each publication a section, you could write a txp-article in which you provide information on the publication/magazine, including publisher, issn etc. You might want to separate out the information you want to have appear elsewhere, e.g. you have a full write-up on the publication in the text-field and the publisher, issn, etc. in the excerpt field. If you want to be able to handle publisher and ISSN etc. separately (e.g. to search for publications by publisher) you will have to note them separately in custom fields – for this post I’ll stick with excerpt. You assign this txp-article to your “publication” section and set its status to be “sticky”, which in the standard setup stops it being listed along with the magazine-articles.

In your page template for the publication, in your section landing area (see if_article_list) use txp:article status="sticky" form="full-mag-description" to output the sticky txp-article showing the magazine profile in full (your full-mag-description form would include the body and excerpt). Directly beneath that you can use txp:article status="live" form="mag-article-headings" to list the magazine articles in that section. Your mag-article-headings form might show just the mag-article title with permlink and author, perhaps an article-thumbnail. This gives you a publication profile on the main page and a sort of table-of-contents beneath it.

To show the publication info with each mag-article, in the individual article part of your page template use txp:article_custom with the id-attribute to specifically display a particular txp-article, e.g. id="id-number-of-sticky-article" as well as status="sticky" and section="your-mag-section" to make sure it shows (default is limited to live only) and form="mag-pub-data". Here your mag-pub-data form might include only the title and excerpt (or custom fields) to show just the publication the mag-article belongs to, the publisher, ISSN etc. The only problem with using the id and section attributes is that they are specific meaning that you need to specify these for each anew for each publication.
Thinking about it, you might actually be able to dispense with id in the example above and simply just use status="sticky". Similarly if you wrap your txp:article_custom in asy_wondertag (which enables you to use tags in tags: info), you can write section="<txp:section />" to always use the current section. Your page template should then work with any publication-section. In the forthcoming 4.07 you will be able to use tags-in-tags without using the wondertag plug-in.

Regarding section and category landing pages, txp has if_article_list and if_individual_article for differentiating between landing pages. You can use these in combination with if_category for category landing pages. The plugin glx_if also provides similar functionality, but since it was originally written much of its functionality can be achieved with txp.

Last edited by jakob (2008-07-09 08:29:29)


TXP Builders – finely-crafted code, design and txp

Offline

#5 2008-07-09 09:19:55

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: using TXP for publication index and discussion site

Consider using <txp:related_articles /> tag. You need some redundancies, but you can easily do it.

  1. For categories use rss_unlimited_categories, that free for you txp cat1 and cat2
  2. Use different section for publications and articles
  3. Use sed_custom_fields for change the custom fields used in publications and articles sections, to match your needs.
  4. Write an article in publication section for any publication you have. Also define a matching cat1 for that, and assign it to that article. I.e. in publications section write an article called “Readers Digest” and assign it a category called “Readers Digest”. A bit of redundancy, here, but nothing difficult.
  5. Write in article section how many articles you want and assign them the cat1 for the matching publication. I.e., “Readers Digest”.
  6. In publications template you could list publications. In single article template for publications, you list the metadata belonging to that publication (set in the corresponding article), and, then, you can list the articles for that publication using txp:related_articles tag using match=“Category1” and section=“articles”.
  7. Also, to publish the publication metadata when in single article (not publication) page, you could use a chh_related_articles plugin that let you also use custom form. So in the single article page template you put the chh_related_articles matching cat1 and section=“publications”, using a form that output the metadata you need called from that article (that represents the publication).

That should do the trick, if everything works and I understood you! :)

Last edited by Zanza (2008-07-09 10:11:48)

Offline

#6 2008-07-11 16:23:43

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: using TXP for publication index and discussion site

jakob and Zanza—

Thanks for your feedback! I shall experiment with your suggestions and post back soon.

kindly,
john stephens

Offline

#7 2008-08-22 15:54:12

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: using TXP for publication index and discussion site

Zanza wrote:

Consider using <txp:related_articles /> tag. You need some redundancies, but you can easily do it.

Zanza: This is exactly what I needed, thanks!

In publications template you could list publications. In single article template for publications, you list the metadata belonging to that publication (set in the corresponding article), and, then, you can list the articles for that publication using txp:related_articles tag using match=“Category1” and section=“articles”.

Also, to publish the publication metadata when in single article (not publication) page, you could use a chh_related_articles plugin that let you also use custom form. So in the single article page template you put the chh_related_articles matching cat1 and section=“publications”, using a form that output the metadata you need called from that article (that represents the publication).

I’m having severe difficulty with the chh_related_articles tag: For each article, I wan’t to output a table of that article’s publication info. I set up an article form with the publication info and within my publication-article article form (default), I’m trying to import the publication info:

<txp:chh_related_articles relation="Category1" section="publications" limit="1" form="_publication-info" />

But nothing happens. It doesn’t produce any errors, and nothing turns up in the txp tag trace in my debugging comments— it just doesn’t output anything.

If I use this, I get a link to the appropriate publication landing page:

<txp:chh_related_articles section="publications" />

The output is identical to the txp native tag:

<txp:related_articles section="publications" limit="1" />

I’d highly prefer to output the publication info on each article page, as you suggested, using the form I created to format the custom field and keyword data.

I’ve searched for this problem, but I can’t find any suggestions that address this. I have enabled the mods by Ruud (which had no discernible effect) and by rad (which created a new error warning, but no other discernible effect).

Any ideas what I’m doing wrong?

Offline

#8 2008-08-22 16:54:26

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: using TXP for publication index and discussion site

Patient, heal thyself!

I think I’m on the right path now; replaced the chh_related_articles tag in my article form template with this:

<txp:asy_wondertag><txp:article_custom section="publications" category="<txp:category1 />" limit="1" form="_publication-info" /></txp:asy_wondertag>

It is now displaying information from my publication info form! I have a few bugs to work out with the if_custom_field tags in that form, but I’m glad that I got this part working!

Offline

#9 2008-08-22 16:56:34

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: using TXP for publication index and discussion site

And, as mentioned, upgrading to 4.0.7 will eliminate the need for the asy_wondertag.

Offline

Board footer

Powered by FluxBB