D
D
Dmitry Grabko2017-10-06 09:17:34
MODX
Dmitry Grabko, 2017-10-06 09:17:34

How to automate the placement of content on 2 sites?

There are 2 sites with a catalog of goods: the main site and a site on a subdomain for another region. Sites have slight differences in templates and information (contacts, text).
When placing a new product, you have to go through the addition twice. Goods are added by hand, there is no unloading.
Is there a way to link the product database for sites?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman, 2017-10-06
@RGBPlus

I think your approach is wrong.
Depending on the region, show the necessary data (template, contacts, etc.) - GeoLocation or Babel , but here is another story - read what it is!
Well, or something like that to move!

E
Eugene Wolf, 2017-10-06
@Wolfnsex

Is there a way to link the product database for sites?
In general, there are quite a few ways, but I don’t think that there is a ready-made solution for the “Modx module, set and forget” level.
They all look something like this:
1. Write some kind of trigger at the level of the CMS itself, or at the database level , or run a script using CRON that monitors database A
2. When an event occurs (when a product is added on site A), or when a CRON script notices changes, a similar insertion operation is performed on site B.
Why it seems to me that you are unlikely to find a ready-made module for these purposes: Modx is a rather flexible system in terms of content management, but at the same time it is rather crooked in many other plans, incl. in the field of working with the database there is a whole "packaging" of not the best solutions. And, in view of its flexibility and solutions of the "not the best" level, writing a ready-made module for such tasks is a rather specific procedure. It is much easier to write a backup module for the entire system than a normally working one-product transfer module (well, this is just an example).

R
Ruslan, 2017-10-06
@ruslan_aleev

Use MODX contexts and symlinks. By default, symbolic links cannot be placed between contexts, to enable this - go to the site admin panel “System Settings”, select “System and Server” in the filter and set “Allow redirection through contexts” to “Yes”.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question