Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-02-04 19:37:22
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
How to change sidebar content when changing article
Hi,
Is there any way of switching the sidebar content when browsing a diffrent article. I need to display different files/links/images depending on the article.
Plugin or not, it doesn’t matter, as long as it does the trick :)
Thanks in advance!
Offline
#2 2007-02-04 20:09:55
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: How to change sidebar content when changing article
I’d be very interested in the replies to this myself and I think the if_article_id tag should come in handy here. However I haven’t gotten around to explore its possibilities yet.
Cheers Martin
Offline
#3 2007-02-04 20:20:36
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: How to change sidebar content when changing article
I’ve noticed that tag. The problem is when I navigate to a section ex. www.domain.com/about/ it only shows the article list. Not until perm-link myself to www.domain.com/about/me-and-you the id gets associated with the stuff inside the if_article_id.
Offline
#4 2007-02-04 22:32:42
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to change sidebar content when changing article
joel wrote:
I need to display different files/links/images depending on the article.
Can you fit what you want to display into the custom/keywords/image/excerpt fields of the article? In that case you’d only have to create a separate article form to call these, and use a second article tag in the sidebar. Still, it would only work on individual article pages.
Offline
#5 2007-02-04 23:05:43
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: How to change sidebar content when changing article
Hey there Els and thanks for your reply!
That could do the trick but it would be really nice if this could work in a more automatic way since many of my clients are non-tech-users. Imagine when writing the article just to select a file-cat to assign to the sidebar.
I can get around the “individual article pages problem” by adding an introductional article on every section and exclude it from the section-nav with offset=“1”.
Offline
#6 2007-02-05 17:24:49
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to change sidebar content when changing article
Experiment: use asy_wondertag.
Put the file category in a custom field named ‘file-cat’. Create an article form for the sidebar:
<txp:asy_wondertag><txp:file_download_list category="<txp:custom_field name="file-cat" />" /></txp:asy_wondertag>
You’ll probably need to wrap the sidebar article tag in if_individual_article tags.
I haven’t tried this, so I’m not sure if it will work. And, if it does work, it does not provide a way to select a file category, the user has to make sure there are no typos when entering the file category.
Offline