By rowshan on
Dear Friends,
I have drupal multisite.
I want to show frontpage's content of subdomain sites to the front page of main site.
e.g. There are the following sites:
site.com
sub1.site.com
sub2.site.com
sub3.site.com
I want to show the frontpage's content of sub1.site.com, sub2.site.com and sub3.site.com into frontpage of site.com
I searched very much in this website but I couldn't find something help me.
Do you have a solution/suggestion for this issue.
Thanks
Comments
Where is the code of the
Where is the code of the frontpage?
I think it should be in node module. But Where?
Maybe with modifying it, I can show nodes of subsites into the main site frontpage.
It depends on how exactly
It depends on how exactly you set up your multisites. There is no answer which covers all cases.
Do the sites use a database with a single shared 'node' table (and also share some other required database tables)? What Drupal version, 5 or 6?
Or do the sites have completely separate database tables? Then your only chance is to pull-in rss feeds using a module which creates nodes from the feed items.
Or is it a single site using an access control module such as the domain module, or some method using the pathauto and subdomain modules? Then you need to use those modules in some specific ways, depending on the details of your setup.
Dear Friend, Thanks, Let me
Dear Friend,
Thanks,
Let me to say the features of my multisite:
Drupal 6
One database with prefix name tables
I didn't had share the node table. But other tables like user, roles, pathauto etc have been shared.
I didn't have use any module for creating multi sites.
If I can change the sql query for frontpage, It will be very easy to SELECT nodes of more than one node table.
Waiting for your help.
Drupal's front page list is
Drupal's front page list is produced using Drupal API functions, which rely on the database (including the table name prefixes) which you have specified in $db_url in settings.php.
It would be much easier to write your php code with the queries you want in a normal Drupal page, and then make that page your front page in /admin/settings/site-information (by using your own page's path, instead of the default front page path which is "node").
Dear cog.rusty, Very thanks
Dear cog.rusty,
Very thanks for your help.
OK! it's good idea.
Do you know where is the API code of the drupal front page?
Yes. It is the
Yes. It is the http://api.drupal.org/api/function/node_page_default/6 function, in the node.module.
As you can see, it makes use of other API function calls, such as node_load($node->nid) which creates a node object from the database tables of the site's specified database.
Sorry, just a noob
Sorry, just a noob suggestion here, probably not what you want:
What about the aggregation module? If you aggregated the front-pages of the sub-sites to your main site, you'd get a teaser list on the aggregation page of your main site.
Dear Anti, I appreciate you
Dear Anti,
I appreciate you for your suggestion. But as you said i want to show them in the front page like all nodes promoted tothe front page of main site, not in a separate page.
If you pull-in a feed using
If you pull-in a feed using a module which can convert the feed items to drupal nodes, such as the http://drupal.org/project/feedapi module, then you can do whatever you want with those nodes.
You can easily have them promoted to the front page,
or you can include them in a custom list of recent posts and use that as a front page,
or whatever.
as cog.rusty said It would
as cog.rusty said
I totally agree! This is the easiest way and the best, but it also depends on the setup of your main drupal site.
----------
My Drupal site: Captivating Capiz - Come and Visit the beautiful Philippine Paradise!