Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Magazine Issues
I have recently redesigned my design magazine Paperview, and one the new features people were asking for was to see Issues, in that they would see an issue in Magazine terms, and then have articles for that issue.
If you take a look at http://alistapart.com/articles/
And see that they have issues with various articles attached to them, although from the looks of it they do it on random days, and have several articles attached at once!
My aim would be to do something alot simpler, by that each issue is monthly, and all articles are attached to that month!
So I get Issue 1 March 2009!
I would really appreciate some help in developing such a system, so TXP knows what issue is what, etc. and on the home page it is able to automatically change the issue based on the month. so say i add 20 articles in march, they would all show, and then as soon as we hit april, they will all disappear and show the april issues instead!
Ideas? Thanks. x
~ Cameron
Offline
#2 2009-03-03 20:01:16
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Magazine Issues
It sounds like sort of an archive, with articles separated by month. Alex posted a good tutorial on how to achieve that with the <txp:if_different>
tag.
Also since 4.0.7 you can give articles an expiration date, which would help address your other requirement.
Last edited by masa (2009-03-03 20:03:22)
Offline
Re: Magazine Issues
Yes But I need TXP to display it as Issues, so understand that 5 articles are part of Issue 12 December 2009 etc.
In short, I’m trying to replicate the system you see at http://www.alistapart.com/ with TXP!
Last edited by driz (2009-03-03 20:51:15)
~ Cameron
Offline
Re: Magazine Issues
If you take a look at http://alistapart.com/articles/ and see that they have issues with various articles attached to them, although from the looks of it they do it on random days, and have several articles attached at once.
I think they do two articles every two weeks on a Tuesday.
My aim would be to do something alot simpler, by that each issue is monthly, and all articles are attached to that month
Using the month as the issue makes things easier: txp:article_custom has a month="yyyy-mm"
attribute that you can use to show articles from just one month.
You can use upm_datetime and the relevant format="%Y-%m"
attribute to insert the current date into your txp:article_custom, for example for your front page.
To output the issue number for an article just use h3. Issue Number: <txp:posted format="%m" />
.
For an archive of back issues use an article archive tutorial linked to earlier and to show just one previous issue, pass the month you want to show using an url variable e.g. http://www.paperview.org?issue=2008-07
and use something like adi_gps to grab that value from the url and use it for your article_custom month attribute. If you want neater urls, you need to adapt your htaccess with an appropriate rule.
If for some reason you decide you want to have a quarterly magazine, use a custom field for the issue number and then use txp:article_custom’s customfieldname="123"
attribute instead of month, likewise for adi_gps. You get the idea.
You can, of course, do all this much more easily with a section for each issue…
TXP Builders – finely-crafted code, design and txp
Offline
#5 2009-03-03 21:27:15
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Magazine Issues
Driz:
Take a look at this:
<txp:asy_wondertag>
<txp:article_custom section="article" sortdir="desc" limit="9999" month="<txp:upm_datetime format="%Y-%m" />" form="VolumeExcerpts" />
</txp:asy_wondertag>
I did this for a site that I had designed and it did the trick.
progre55
Offline
Re: Magazine Issues
Could you explain it please, like how it works and what it does. Thanks
~ Cameron
Offline
#7 2009-03-03 21:40:07
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Magazine Issues
Driz:
Please take a look at this site: Celebrate Hilton Head
Go to Current Issue or Archives Tab to get a better understanding of the capabilities.
This should give you some insite. Not sure if this is what you are looking for, but maybe it will help.
progre55
Offline
Re: Magazine Issues
driz, it’s exactly the same as what I suggested, just read what I wrote. Since 4.07 you no longer need asy_wondertag and can now write it as follows:
<txp:article_custom section="article" sortdir="desc" limit="9999" month='<txp:upm_datetime format="%Y-%m" />' form="VolumeExcerpts" />
TXP Builders – finely-crafted code, design and txp
Offline
Re: Magazine Issues
Okies, could you post the code I would need for the default page! The code for the articles archive page! and explain how it would work say I wanted to choose an issue from the list of articles. So that I can fully get my head around all of this. Thanks.
~ Cameron
Offline
Re: Magazine Issues
driz,
You’ve got take some steps on your own here…Experiment with the code provided, and then come back with questions…having someone else do your homework will never make you any smarter.
Last edited by renobird (2009-03-04 02:03:50)
Offline
Re: Magazine Issues
Tom is right. Also you need to read the answers to your questions. Both my second post and that from progre55 provide you with the code for the default page, my first post explains how it works and how to do the archive post and masa posted a link to a tutorial. My first post also shows how to display the issue that an article is in – you just need to make that into a link to call up the issue contents list. How that works is described in my first post too.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Magazine Issues
I have the default page setup and using that plugin upm_datetime it only shows the articles from the current month, so showing this months issue!
BUT What i want to know is how to get it to show the issue number, so in my header I could have ‘Issue 1 – March 2009’
If you look at http://paperview.org/ you will see a pink title saying the date and issue, well basically I need ‘#’ to show 1, and then in april it will show 2 etc.
Last edited by driz (2009-03-04 13:02:33)
~ Cameron
Offline