krjrs
10-24-2008, 11:29 PM
I was thinking, and I will try to describe it through an example because I can have a problem to express it in english.
*
Thanks to ajax it's possible to load external content.
I was wondering whether it is possible to do following.
1. First step.
Let say that I have a folder with some content files.
So I have a folder with content like that:
contentfile1.htm
contentfile2.htm
contentfile3.htm
...
contentfile#.htm
Is it possible that one html file loads automatically all files from the content folder (no matter whether there are 1 or 5 or 30)?. The general idea is, that when I click on my html file - it loads all the content files one by one, and the page will looks so:
<body>
contentfile1
contentfile2
contentfile3
...
contentgfile#
</body>
So I don't have to modify each time my main-file when I create some content.
If this solution is possible - would it be necessary to take care, that all contentfiles are loaded into this html page?
2. Making it more complicated.
Let say, that the names of the content files are tagged (via header or filename).
file001-tag1a-tag2a-tag3a-tag4c.htm
file002-tag1b-tag2a-tag3c-tag4c.htm
file003-tag1a-tag2b-tag3a-tag4c.htm
...
file###-tag1c-tag2b-tag3a-tag4c.htm
As you can see,
- according 'tag1' there are 2 files with '1a', 1 file with '1b', 1 file with '1c'
- according 'tag2' there are 2 files with '2a', 2 files with '2b'
- according 'tag3' there are 3 files with '3a', 1 file with '3c'
- according 'tag4' there are 4 files with '4c'.
General idea is to use a constant formula/string for tagging (like 4letters-4letters-4letters.htm) for every content file.
I'd like to have html files capable to select which files they will load from the content folder. For example:
- mainfile1 loads content according to 'tag1' but only with the tag1a string
- mainfile2 loads content according to 'tag2' but only with the tag2a string
- mainfile3 loads content according to 'tag3' but only with the tag3a string
- but - mainfile4 loads content according to 'tag1' but only with the 'tag1b' string
...and so on
And then I can very easy distribute the content on the entire website, working only with the content files, and leaving the template.
*
puff... is it possible to follow javascript/ajax way?
*
Thanks to ajax it's possible to load external content.
I was wondering whether it is possible to do following.
1. First step.
Let say that I have a folder with some content files.
So I have a folder with content like that:
contentfile1.htm
contentfile2.htm
contentfile3.htm
...
contentfile#.htm
Is it possible that one html file loads automatically all files from the content folder (no matter whether there are 1 or 5 or 30)?. The general idea is, that when I click on my html file - it loads all the content files one by one, and the page will looks so:
<body>
contentfile1
contentfile2
contentfile3
...
contentgfile#
</body>
So I don't have to modify each time my main-file when I create some content.
If this solution is possible - would it be necessary to take care, that all contentfiles are loaded into this html page?
2. Making it more complicated.
Let say, that the names of the content files are tagged (via header or filename).
file001-tag1a-tag2a-tag3a-tag4c.htm
file002-tag1b-tag2a-tag3c-tag4c.htm
file003-tag1a-tag2b-tag3a-tag4c.htm
...
file###-tag1c-tag2b-tag3a-tag4c.htm
As you can see,
- according 'tag1' there are 2 files with '1a', 1 file with '1b', 1 file with '1c'
- according 'tag2' there are 2 files with '2a', 2 files with '2b'
- according 'tag3' there are 3 files with '3a', 1 file with '3c'
- according 'tag4' there are 4 files with '4c'.
General idea is to use a constant formula/string for tagging (like 4letters-4letters-4letters.htm) for every content file.
I'd like to have html files capable to select which files they will load from the content folder. For example:
- mainfile1 loads content according to 'tag1' but only with the tag1a string
- mainfile2 loads content according to 'tag2' but only with the tag2a string
- mainfile3 loads content according to 'tag3' but only with the tag3a string
- but - mainfile4 loads content according to 'tag1' but only with the 'tag1b' string
...and so on
And then I can very easy distribute the content on the entire website, working only with the content files, and leaving the template.
*
puff... is it possible to follow javascript/ajax way?