I've got a site in which there will be an overview page with some high-level navigation and links to individual nodes. I can determine which nodes to display by using their taxonomy categories. It would be easiest to do this in a php file that sits on the filesystem rather than what the "front page" module or a "php" page object, as editing relatively complicated code is something that I'd rather do in emacs than a textarea.
From this overview page, there are several sub-pages that also provide overviews of specific content areas. These pages will be similar to the main page but will restrict some of the categories further and provide information on content related to specific categories.
My question is: what is the best way to approach this? I can create a new content type for the front page and each of the sub-pages and template them all separately and have the "body" field of the content type contain the path to a php file to include. I already have about 20 different content types in the administrator's panel (not all will be available to the individual content editors), so adding a new content type for each category (I will have about 12 for this site) looks a little messy.
My guess is that doing an include on a php file would probably be faster than an eval() call, as well -- but if anyone has any suggestions on how to approach this or if anyone has done something similar (I was not able to find something by searching), I'd be interested in hearing options.
Comments
Check the existing Modules, first
KISS: Is /taxonomy/or/2 (or any number) what you are looking for for each "front page"?
If so, then maybe what you are looking for is one of the existing Taxonomy* modules for providing automatic navigation between taxonomies:
http://drupal.org/project/Modules
--WorldMaker--
much more complicated than that
i've got to select some nodes that are the union of several taxonomy terms and arbitrarily many custom divs with content specific to that category. All of the extra content that is specific to that page is why it would need to be it's own content type so that I can write a template for that (eg. page-home.tpl.php or page-articleytpe.tpl.php).
I can't template them differently if I'm using taxonomy display (afaik)
One of the big things that I need is the ability to add very many little php scripts in these divs that can pull information from other databases. And editing all of this php is not fun in a textarea. I want it on the filesystem.
sections
sections module to theme sections. :)
Do your coding in emacs and then copy and paste into the text area.
-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Copy and paste...
Not a good solution for me... It takes forever when editing or making small changes to make sure the tabs are right and it's nearly impossible to read without syntax highlighting once you're used to it.
I think I'm just going to have to do some heavy lifting inside the templates.
well
one other posibility to look at is the blogapi (reaching here). Not liking EMACs myself, is there a blogging extension for it? If there is, you can see if you can interface with the blogapi and post to a 'Page' type (do-able in 4.6) and make sure that that one account you post these special pages with has a default workflow type to post php content and not html and filtered html.
I am accustomed to syntax highlighting, I just don't do web development. :)
-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
You can create a union page
You can create a union page of taxonomy terms using something like
/taxonomy/or/1,2 (old form)
/taxonomy/term/1+2 (new form)
As for content divs, if you are using the Block system to display them you can target specific blocks to specific pages via the path text box, for instance:
<^taxonomy/term/1+2$>
Would match only the page /taxonomy/term/1+2.
--WorldMaker--
How about...
How about using the front_page module, and just get it to include a php file from the filesystem? Or is it trickier than that?