Share page content over multiple sites

Narisorn Pongpanich asked on October 29, 2014 01:07

Hi,

We are creating the job listing site in Kentico 8.1 which will have 1000+ listing pages.

If we need to add other sites in same Kentico instance which they can search and display those listings in their own template.

What are the best ways for implementing this?

Thank you in advance

Correct Answer

Brenden Kehren answered on October 29, 2014 06:15

I'd create a custom query on the page type and display them in the a repeater. This way you can eliminate the "site ID" filter.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Jan Hermann answered on October 29, 2014 14:26

Each listing web part should contain a property for selecting source site, so you can list pages from different site or you can write your own sql query in combination with Repeater with custom query as Brenden suggested.

Best regards,
Jan Hermann

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 29, 2014 18:44

If I remember right, by default, if you leave the site empty, it puts the current site in place of it. If you select a site, you're locked into that site unless you use a macro. If you want to simply "select all jobs from table_jobs" that are not site specific then a custom query on the page type would be simplest approach.

1 votesVote for this answer Mark as a Correct answer

Narisorn Pongpanich answered on October 29, 2014 23:37

Thanks guys,

It's ok to include the SiteID as this might simplify the query the job data will sit in first site only.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 30, 2014 05:11

You are correct Narisorn. The problem is if you are using the repeater on site 2, siteid will = 2 and not 1 so you won't get any results. Within your custom query, you'd have to specify/hard code that site id or leave it empty so it would get all jobs no matter what site.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.