
Silvatti
User
Oct 4, 2006, 12:21 PM
Post #4 of 6
(4721 views)
Shortcut
|
|
Re: [ChetW] Inserting Article Lists w/ PHP includes
[In reply to]
|
Can't Post
|
|
I know, it's a bit complicated... a visual representation I could talk about might help clear things up. =]
Here is an example of my category index. I've edited the templates/index/default.html file to auto-generate index pages in this format. First, I've divided the page into four "invisible" quadrants: Quadrant 1 is where an AM-generated category listing is intended to appear. But notice that the category listing is not a global one --it's limited to that specific category being displayed (in this case, "History"). Note also that "history" is not among the options you can click on. Instead, it displays subcategories two levels deep from the present category being displayed (I talk about this little quirk in this post. Quadrant 2 is where I'd like to display the latest headlines for this category, but only those that are "full article"-type entries. In Quadrant 3, I want to be able to update this section's introductory text purely by way of displaying AM-generated "Summary" articles. In Quadrant 4, I want to display only AM-generated "Link"-type articles for this category. Ordinarily, I would have no problem if I wanted to display this category's headlines all together in one place on the page. I'd just insert a single PHP include pointing to the category's corresponding cat_headlines_## file. But this will not work if I want the output to be segregated on the page by Article Type. My solution so far has been to create three pseudo-subcategories for HISTORY in AM --One entitled ESSAYS, another entitled RESOURCES, and another entitled SUMMARY. Then I'd create only "full articles" for ESSAYS, "Link articles" for RESOURCES, and "Summary only" articles for SUMMARY. Now these psuedo-subcategories have cat_headlines_## files associated with them, displaying my articles the way I want them to. I'd then insert three PHP includes into my index template pointing to these cat_headlines_## files onto my HISTORY index page. Functionally speaking, this works as a solution, but if I want to implement this effect for the rest of my site, I would have to create custom Index templates for every category on my site. I'd have to log into AM, and set the HISTORY category to use not the default.html index file, but a custom "history.html" template with those specific PHP includes. For the AMERICAN index category, I'd have to create an "american.html" index template with its unique cat_headlines_## file includes, and so on... I guess I'm asking: is there an easier way to do this? :P
(This post was edited by Silvatti on Oct 4, 2006, 12:31 PM)
|