Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-08-04 19:53:15
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Building a Knowledge Center
I’ve just been handed a challenge I am not 100% sure how to tackle…
Basically I need to post about 400 articles into TXP under a “Knowledge Center” section.
Issue #1 – Each of the articles must somehow get filed under a letter.
Issue #2 – All of the letters must be visible on the bottom as a navigation list. When you click one it takes you to the anchor on the main page which shows the letter as a header and a dynamic list of articles that correspond underneath..
Issue #3 – Some of these articles are split into up to 10 parts, so I would need to have another side nav with links to the other parts of the current articles.
Right now the only solution I can think of is to create categories A-Z and possibly use some related_articles action for the split articles… but I am sure there must be a cleaner solution…
How would you do it?
Last edited by Ace of Dubs (2006-08-04 20:01:50)
Offline
#2 2006-08-04 20:10:51
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Building a Knowledge Center
To start with: a thread, and an article.
Offline
#3 2006-08-04 21:27:15
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: Building a Knowledge Center
THanks Els,
That was preciely what I was looking for.
The only hurdle left is deciding how I am going to split these articles up into different pages, yet only have them show up in the article list as one big article.
For example, I will have “Tutorial Part 1”, “Tutorial Part 2” etc etc as individual articles, but I only want them to show up on the alpha listing as “Tutorial”
I suppose I can use two custom fields (Alphabet and Part) and then use conditional tags to only display Part 1..gonna tinker with this a bit…
Offline
Re: Building a Knowledge Center
ace, maybe the paginated articles plug-in is a solution for you. Or this newer one.
Last edited by jakob (2006-08-04 22:07:48)
TXP Builders – finely-crafted code, design and txp
Offline
#5 2006-08-05 12:43:33
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: Building a Knowledge Center
cheers jakob,
That newer plugin almost fits the bill. The only problem is that it outputs navigation by numbers and there is no way to assign titles to each page.
Until the author provides an update, it looks like I will have to dream up some convoluted way to do this without plugins…
Offline
Re: Building a Knowledge Center
In what way are the sub-parts of the tutorial named differently? Above your wrote “Tutorial Part 1”, “Tutorial Part 2” etc., but that would work with plug-in as it is. From a usage point of view, one article per item would best fit the txp way of working – you can use all the standard tags, output the full article as print version etc. etc. don’t have to concatenate other articles or strip them from searches etc.
If it’s just for the sub-menu of the knowledge article itself, maybe you just need to tackle that problem individually. Perhaps you have a custom field with a comma-separated list of the part names and use it to build the menu attaching a pg=n link to each item appropriately. Just thinking aloud, as I don’t know your actual requirements…
TXP Builders – finely-crafted code, design and txp
Offline
#7 2006-08-05 15:45:20
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: Building a Knowledge Center
We are thinking along the same lines.
To clarify, my articles sometimes get split up into Part 1,2,3,etc and other times, each part has its own title, like:
“Tutorial 3: How to Blend Vectors”
I am starting to lean more towards using individual articles now and using some category/custom_field trickery to get the desired effect. The only part of your post I dont understand is how to attach a pg=n link to each item…
Offline
Re: Building a Knowledge Center
Well, it would need a plug-in function either way, I imagine.
etz_pg: On the first and second page of etz_pg plug-in thread there are some requests for page title values and arkham came up with a solution of sorts where a title string was added to the page break marker (see also a couple of comments further down). I guess they were for an earlier version, but you may find it is not all that difficult to make the adjustments fit the current version of the plug-in. It’s certainly more elegant than my ‘thinking aloud’ idea.
“thinking alound option”: You can think of this as an extra “contents-list” for your paginated article. You’d need a small plug-in function to read out the custom field string and break apart the comma-separated (or other delimiter if you need commas in the titles) list of sub-page headings into an array of page titles and then to make a menu list (or whatever you need) out of those titles with the links made with the correct ?pg=n. When inputting the articles, you have to make sure that the number of comma-separated items corresponds to the number of [page] markers.
The function is not very complex so should be no problem for php-programmers. I’m no php guru, so my approach at cobbling something together would be to begin by looking at plug-ins that do something similar, i.e. the article_thumb functions that read out comma-separated lists out of fields and then some of the menu list generating functions.
TXP Builders – finely-crafted code, design and txp
Offline
#9 2006-08-05 18:17:26
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: Building a Knowledge Center
Well I have used Arkham’s hack, and while it is great for providing a link to the next Article with the Title, I still cant figure out how to have this plugin spit out a navigation list of all the pages using title instead of numbers.
It’s probably a simple affair of PHP… will have to really dig in and see if I can hack something up
Offline
Re: Building a Knowledge Center
glad it was of some use. Did you see the arkham’s follow-up comment ? It mentions page titles for navigation.
TXP Builders – finely-crafted code, design and txp
Offline
#11 2006-08-05 21:54:03
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: Building a Knowledge Center
I did check that out but I dont understand what he means by
bq..
In this case you’d need to add another option to the tag etz_pg to control whether this type of page title navigation should be used
What option do we add? What is the attribute and variable?
I wrote to the author of this plugin, so hopefully he will be able to help. Thanks for pointing me in the right direction though..
Offline
Pages: 1