![]() However, you can not map image titles or descriptions from the Mercury version to the additional fields available with an image field type (such as the alt text, description, etc.) So to display the full details of a related image it would be best to instead map the image’s “nid” value in Mercury and use hg_reader functions to build the display of the image in your local content type where you could add a title and description as intended by the original contributor. This will return the full path to the image file on Mercury, and since it’s mapping to an image field in the local content type it will pull a copy of the image down to your server and store it with your local node. So for instance with your title field you’d enter “title”, for the body field “body,” etc.įor the “field_image” above note that it’s set to use the “image_full_path” value. Now that you’ve identified the fields to be mapped you need to provide an XPath value for each field.įor each field that you’ve added you’ll want to provide the appropriate value based on the XML tags in Mercury’s feeds. ![]() For this choose the “GUID” option for the target, and you’ll later map this to the item’s Node ID in Mercury. ![]() Note that you’ll need to select a field to serve as a unique target. For each field select the “xpathparser” option, then a field from the target drop-down, and select the Add button. Node Processor Mapping - Now you’ll want to add the mapping for the fields of your local news/event content type that you plan to populate with Mercury content. ![]() Select your content type that you want to map Mercury content to, the default author of your local nodes (typically a site administrator), and an Expire setting if desired (usually this is left at Never). If you plan to only include Mercury content in your local nodes you can opt for Replace existing nodes, but most users stick with the Update existing option.įor Text format it’s best to select an input format that allows most block-level HTML tags, or at least the same options that you see in the body field of Mercury items. Node Processor Settings - If you plan to add additional fields to your news/event nodes that are not populated from Mercury you’ll want to set it to update existing nodes.Processor - Skip down to Processor (we’ll return to XPath XML processor settings after mapping) and select the Node processor option.HTTP Fetcher Settings - Leave as is (don’t check either option).For most cases it’s best to have it automatically import only twice a day, and then manually override it if you want something to show up sooner.Īll other setting can be left as is. Periodic import - If you want imports to run automatically then choose an interval. All standalone importers can be found at /import If you prefer to create a content type to use as an importer, you can assign one under “Attach to content type,” or you can choose to “Use standalone form.” The standalone form usually works for most purposes. For fields that can have multiple values be sure to also configure your local node’s field to do the same (such as with related links, or keywords.)įor images associated with a Mercury item you can either map/store the node ID of the image (which would then require using hg_reader functions for building the display of the images,) or download the image directly to your site Feeds Settings Basic Settings Go to the Feed importers on the Structure administrative menu to create a new importer that you will use to map Mercury content to your local news/event content types.īut, before you get started with building importers you’ll want to first set up your content types with fields that match the basic structure of Mercury news/events, such as adding fields for a summary, summary sentence, related links, boilerplate, etc.Install the Feeds Extensible Parsers module.Install CTools and Job Scheduler (dependencies of "Feeds").We strongly recommend that you try to utilize the built-in functionality of the Mercury Reader Module whenever possible, and only use Feeds Extensible Parsers as a last resort. (This module supersedes an older module called "Feed XPath Parser", which is no longer supported and should not be used.)Įditor's Note: While this method is being utilized by some units on campus, it can not be recommended due to the Feeds Extensible Parsers module still being in a beta release since April 2015, and not being covered by the Drupal organization's security advisory policy. Feeds Extensible Parsers is the module normally used to do XML and JSON imports of news and event data from the Mercury server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |