Forum
Working with Perch and RightMove .blm format feed
Has anyone used Perch to generate a RightMove .blm format feed? This is for an overseas property site where RM only accept .blm format.
For the uninitiated, .blm format is a text file with data values separated by | symbols. This also means that the correct number of values and blanks need to be generated. For example, the feed allows for 10 property features and whilst I can get these from Perch, there are problems generating the blank fields when the number of features is less than 10.
Any help appreciated. Thanks
Can you show us your code?
Currently, I have this for my data-feed.html template. My main issue at the moment is generating the appropriate number of blank items for Features and Images (max 10 allowed in each case) when there are less than the max number.
The format of if/else is like this:
There is no
<perch:else>|</perch:else>
syntax.Oh, my mistake. I'll recode it and repost.
Have just been told that RightMove are developing an .xml feed to replace .blm format "in a few months" so this work is being put on hold for the moment. I may have to revisit it if the RM thing is delayed. Even with that and correct
<perch:else />
syntax, I cannot see how to output the correct number of blank items though.Because of the repeater?
Yes, I can see that
with, for example, 10 separate text or image fields, would give me what I want. Cannot see how to do it with repeater though.
Oh hang on a minute....
Revised code for the image section of my template:
So far, this seems to be working correctly (ahem). Is the above what you would do?
Sure, if it's working!
Have done some more testing. It works to the extent that there are images in the repeater (of course). What I mean is, if there are five images in the repeater, and I use
the output is two images and three | symbols.
What I need to do though is output 10 values in total. In the above case, this would mean two images and eight | symbols. Still thinking on that...
Yes, that was my concern with the repeater - it will only output items that exist, not items that don't exist.