Forum Moderators: phranque
Is there a way of doing this by using SSI?
Thanks.
Istvan
You would want to create each SSI file with a different designation:
<!--#include virtual="test.html" --> would become
<!--#include virtual="testa.html" -->
<!--#include virtual="testb.html" -->
<!--#include virtual="testc.html" -->
<!--#include virtual="testd.html" --> and so on...
and then each of the html pages
=> page1.html would pull in SSI testa.html with whatever content you want to include in this file
=> page2.html would pull in SSI testb.html with whatever
content you would to include in this file ... and so on..
is this what you want to achieve...? if so then it is very doable...
At the moment we indeed use testa.html, testb.html etc.
But I was wondering if it is possible to put all the files in test.html and include in the pages where I want to include some parts of test.html that part. And another page I include also test.html but then the next paragraph which is shown at test.html.
So instead of using:
!--#include virtual="test.html" --> would become
<!--#include virtual="testa.html" -->
<!--#include virtual="testb.html" -->
<!--#include virtual="testc.html" -->
<!--#include virtual="testd.html" --> and so on...
I want to use only!--#include virtual="test.html" --> and specify at page 1.html that there is a need to include a certain paragraph of the text in test.html. At page 2.html I only want to include from test.html a table. Is this possible in this way?
You cannot include part of a file, but by using CSS you can ensure only part of a file is displayed.
Within the included file, each displayable section must be placed within its own div. Each div must have either a unique id or a shared class. Each calling page must then use css instructions to show the required section. If included data must appear inline use span instead of div.
Having said that, if you are talking about hundreds or thousands of sections, then a perl/php solution would be more efficient.
Kaled.
Is this done in an external file or you just put all the different data (tables in my case) on all pages and just place a div (and the rest you treat as an hidden field) for the tables which I want to display at a certain page?
Is this hidden css stuff not dangerous in that way that Google might look at it as a form of spam (hidden fields)?
Istvan
Use of perl/php to provide a server-side solution may well be preferable and probably would be straightforward.
Kaled.