Moboom handles content in a unique way. Your content (text, images, and so on) can be managed completely separate from the design of your pages. Beyond that, you can also manage your content outside of the studio. This course teaches you how to import and sync that content.
If you have content that you created outside of the Studio, you can import it, and use it on your site. You can you even set up a regular sync so you can continue to manage the content outside of the Studio.
For example, if you're already hosting an XML feed with a list of products, then just sync the feed with the Studio.
Don’t worry, pages and widgets treat synced content sets just like Managed content sets.
You can sync content (in a variety of formats) with the Studio. The Studio represents Synced content sets pretty much like managed content sets—except you can’t edit the content in the Studio.
Next, learn about the different types of content that you can sync.
Let's discuss how to structure your files:
Regardless of the format (which you’ll learn more about soon), each entry (e.g., product or blog entry) should have its own unique ID.
You don't have to name this field ID, but the field must include a unique identifier. The ID allows the Studio to distinguish the item, so that you can update it for example.
Each item in your synced content set needs a field with a unique ID.
<tea> <id>earl-grey</id> <name>Earl Grey</name> <description>Tea. Earl Grey. Hot.</description> <price>3.99</price> </tea>
Tip Remember in Separate Content & Design, that the ID is used in the URL. So we recommend human-readable IDs. That’s how the pages for the University site have short, clean URLs.
The Studio accepts content in several formats:
When using an XML feed, make sure that the entries are nested in one surrounding element. In the following example, each different tea is surrounded by a <tea>
element. And each <tea>
is nested in the overall <teas>
element.
And, as mentioned earlier, each item must also contain a unique ID. In the following example, each <tea>
has a unique <id>
.
Here's the example XML file:
<?xml version="1.0" encoding="UTF-8" ?> <teas> <tea> <id>peppermint</id> <name>Peppermint</name> <caffeine>0</caffeine> <type>Herbal</type> <description>It's better than tea. It's peppermint.</description> <price>4.99</price> <image>http://example.com/imgs/peppermint.png</image> <thumb>http://example.com/imgs/peppermint-small.png</thumb> </tea> <tea> <id>ginger-mint</id> <name>Ginger Mint</name> <caffeine>0</caffeine> <type>Herbal</type> <description>Some days you get the ginger mint, and some days the ginger mint gets you.</description> <price>5.99</price> <image>http://example.com/imgs/ginger-mint.png</image> <thumb>http://example.com/imgs/ginger-mint-small.png</thumb> </tea> <tea> <id>earl-grey</id> <name>Earl Grey</name> <caffeine>50</caffeine> <type>Black</type> <description>Tea. Earl Grey. Hot.</description> <price>3.99</price> <image>http://example.com/imgs/earl-grey.png</image> <thumb>http://example.com/imgs/earl-grey-small.png</thumb> </tea> <tea> <id>hojicha</id> <name>Hojicha</name> <caffeine>20</caffeine> <type>Green</type> <description>Our hojicha is roasted in a porcelain pot over charcoal, which lowers the caffeine content.</description> <price>3.99</price> <image>http://example.com/imgs/hojicha.png</image> <thumb>http://example.com/imgs/hojicha-small.png</thumb> </tea> </teas>
The top level of your JSON feed should be an array (a square bracket) of items. So if your array of items is currently buried within one or more objects (e.g.: { "teas": { "tea": [
…), then remove the objects and set the array as the top level.
Also, like with other types of feeds, each item should include a unique ID element.
Here's an example JSON feed:
[ { "id": "peppermint", "name": "Peppermint", "caffeine": "0", "type": "Herbal", "description": "It's better than tea. It's peppermint.", "price": "4.99", "image": "http://example.com/imgs/peppermint.png", "thumb": "http://example.com/imgs/peppermint-small.png" }, { "id": "ginger-mint", "name": "Ginger Mint", "caffeine": "0", "type": "Herbal", "description": "Some days you get the ginger mint, and some days the ginger mint gets you.", "price": "5.99", "image": "http://example.com/imgs/ginger-mint.png", "thumb": "http://example.com/imgs/ginger-mint-small.png" }, { "id": "earl-grey", "name": "Earl Grey", "caffeine": "50", "type": "Black", "description": "Tea. Earl Grey. Hot.", "price": "3.99", "image": "http://example.com/imgs/earl-grey.png", "thumb": "http://example.com/imgs/earl-grey-small.png" }, { "id": "hojicha", "name": "Hojicha", "caffeine": "20", "type": "Green", "description": "Our hojicha is roasted in a porcelain pot over charcoal, which lowers the caffeine content.", "price": "3.99", "image": "http://example.com/imgs/hojicha.png", "thumb": "http://example.com/imgs/hojicha-small.png" } ]
To structure a CSV file, list the column names in the first row, and place each entry (each different tea in this example) in its own row.
Remember to include a column with a unique ID.
Here's an example of a CSV file:
id,name,caffeine,type,description,price,image,thumb "peppermint","Peppermint","0","Herbal","It's better than tea. It's peppermint.","4.99","http://example.com/imgs/peppermint.png,http://example.com/imgs/peppermint-small.png" "ginger-mint","Ginger Mint","0","Herbal","Some days you get the ginger mint, and some days the ginger mint gets you.","5.99","http://example.com/imgs/ginger-mint.png","http://example.com/imgs/ginger-mint-small.png" "earl-grey","Earl Grey","50","Black","Tea. Earl Grey. Hot.","3.99","http://example.com/imgs/earl-grey.png","http://example.com/imgs/earl-grey-small.png" "hojicha","Hojicha","20","Green","Our hojicha is roasted in a porcelain pot over charcoal, which lowers the caffeine content.","3.99","http://example.com/imgs/hojicha.png","http://example.com/imgs/hojicha-small.png"
You can also create a synchronized feed from a simple Excel file.
To structure the file, list the column names in the first row, and place each item (each different tea in this example) in its own row. Remember to include a column with a unique ID.
Also, format the file as an .xls (.xlsx files will not sync correctly).
Here's an example of a table showing the structure for an Excel (.xls) file:
id | name | caffeine | type | description | price | image | thumb |
---|---|---|---|---|---|---|---|
peppermint | Peppermint | 0 | Herbal | It's better than tea. It's peppermint. | 4.99 | http://example.com/imgs/peppermint.png | http://example.com/imgs/peppermint-small.png |
ginger-mint | Ginger Mint | 0 | Herbal | Some days you get the ginger mint, and some days the ginger mint gets you. | 5.99 | http://example.com/imgs/ginger-mint.png | http://example.com/imgs/ginger-mint-small.png |
earl-grey | Earl Grey | 50 | Black | Tea. Earl Grey. Hot. | 3.99 | http://example.com/imgs/earl-grey.png | http://example.com/imgs/earl-grey-small.png |
hojicha | Hojicha | 20 | Green | Our hojicha is roasted in a porcelain pot over charcoal, which lowers the caffeine content. | 3.99 | http://example.com/imgs/hojicha.png | http://example.com/imgs/hojicha-small.png |
Okay, so you want to import content. Once you have your file, the next step is to host it somewhere. That somewhere can be your own hard drive or it can be the URL where the file already lives.
Specifically, you can import feeds hosted:
http://example.com/teas.xml
.Once you have a file and have it hosted, import it by creating a synced content set.
To create a synced content set:
id
.)tea
.)http://example.com/feeds/teas.xml
).example.com
).21
). Usually, this field isn’t necessary.feeds/teas.xml
).Once you’ve imported your content, you can:
If your content changes or if you get an error, re-import your content.
So, to re-import content:
Unlike with Managed content sets, Synced content sets don’t have a draft mode. So once the import is finished, your content is completely updated.
Before synchronizing your content, verify that it’s formatted correctly and free of errors. Otherwise, you can end up with broken pages.
Once it’s finished updating verify that everything went according to plan on the Content tab by checking the headings:
Note You’ll only see deletes if you set your Purge Policy to Replace.
Verify that everything went according to plan on the Content tab by checking the headings.
The Purge Policy tells the Studio how to handle new content that you import. Should it replace the old content completely or add to it?
To set the Purge Policy:
So, when you re-import content, the Studio can treat it a couple different ways:
If your external content is updated regularly, set your content set to sync with that content regularly.
To set up a scheduled import:
You can set up the sync to happen:
The Activity tab has a log of every time you have tried to import the content set. So if you notice an error after an import, check the Activity tab to see what went wrong.
If you notice errors when importing a content set, check out the Activity tab for a log describing the error.
A couple common errors are:
You might see an error that looks like: The ID attribute "id" was not found. This error indicates that the Studio couldn't find the unique ID attribute (which is called id in this case).
So take a look at your file and make sure that each item has an ID attribute.
You might also see this error when the individual items are nested deeper than the Studio expects. For example, you would see this error if instead of beginning the JSON file with a simple array of items, you began the file with a more complex structure like:
{ "teas": { "tea": [ ...
If that’s the case, remove the objects and set the array as the top level. See the JSON files section for an example.
This error indicates that the Studio couldn't find the unique ID attribute (which is called id in this case).
If you see an error that says failed to parse or parser error, you have an issue with the format of your file. For example, this could mean:
<tea>
as well as </tea>
).<tea><teas>…</teas><teas>…</teas></tea>
).
Once you've successfully synchronized a content set, you can tell the Studio how to map each field.
By default Moboom maps each field as a String that should be Indexed. This works for most scenarios, but if you’re having trouble with search or sorting, or if you need to change a field for a custom widget, you can do that on the Mapping tab.
On the Mapping tab, you can adjust the:
For example, String, Double, Date. Generally, if you don’t know what these terms mean, you don’t need to adjust them. These are programming terms that refer to data types.
String is fine in 99% of situations.
This option sets what the Studio should do with the field. You have a few options: