ContributionsMost RecentMost LikesSolutionsRe: Random number generatorHi Christine, is there any way for this to be used more than once at once, so to speak? for instance : Random 1 = ${utils.numbers.randomIntWithCeiling(25)} Random 2 = ${utils.numbers.randomIntWithCeiling(25)} Random 3 = ${utils.numbers.randomIntWithCeiling(25)} Will return the same number for all 3 variables. The ceiling is the number of posts I have, and I want 3 random posts. I tried Random1 = ${utils.numbers.randomIntWithCeiling(TotalPosts)} Random2 = ${utils.numbers.randomIntWithCeiling(TotalPosts -1)} Random3 = ${utils.numbers.randomIntWithCeiling(TotalPosts -2)} And that works in that random numbers are generated but there are a few pitfalls in that approach like causing duplicates. I will obviously have to account for duplicates etc. anyway but still, if I can keep the approach as clean as possible I would prefer that. Thanks for your help with the original request though that has helped a lot.Re: Random number generatorAwesome, thank you.Random number generator Hi, FreeMarker doesn't have a random number generator for some reason so has anyone created one before? I want to display random posts depending on topic so I can create a more dynamic page. For instance, I want to pull all posts labelled 'Test' and display 3 of these at random. I don't think I can do this via JS because I have to call the total number of posts with that label and then generate 3 random numbers within that range, then display those specific posts. As far as my admittedly limited experience with JS goes, because all of this happens server side the JS can't run at the correct point in this sequence. I found this random number generator: http://freestyle-developments.co.uk/blog/?p=327 which does work but only to a point, in that it's not entirely random, if you use a range of 1 to 10 and run it 10 times, almost half return 1 so I don't think it's accurate at all. Even if you put in a range of 1 to 25000 you still get 1 almost every other time. All I want is something similar to JS Math.random(min, max) but can't find a simple way of doing this at all. Can anyone help? Thanks SolvedPost blog article via API Hi, does anyone know of any way of posting blog articles via API? We are looking at using a new content management tool to oversee approval processes etc. internally which will categorise content. The content will then all be present in one location and which will currently then be needed to be uploaded into Lithium, this will result in the work being done almost twice. Does anyone know if you can upload a blog article directly into the system via API? I can go into a fair bit more detail if needed but if it's not remotely possible then there's not much point. Thanks, Dom Re: Find out article draft state via APIHi, was this ability to find draft articles via API ever implemented? Thanks, DomUtterly stuck with component Hi, I am seeing a very strange error which I cannot figure out. I have 2 components that both work the same way, I have literally copied and pasted the same snippet into both components but I'm seeing an error on one. I have <#attempt> <#assign msg_id = rest("/categories/id/${categoryName}/threads/style/blog/featured?page_size=3").threads.thread.id /> <p>Featured Article Present - ${msg_id}</p> <#recover> <#-- If no article featured, get the third article in the list --> <#assign msg_id = CheckList.id /> <p>No Featured Article Present - ${msg_id}</p> </#attempt> The CategoryID variable is assigned and the call is pulling the first featured article in the category. If there is no featured content it pulls a different article. The calls work fine, both when there is a featured content and without. However, if I remove either <p> content I get an error. The idea was that if there was no featured content present, the call would return an error, then the recover snippet would run and that never has an error. But if I remove <p>Featured Article Present - ${msg_id}</p> I get an error, whether or not there is featured content present. I have been banging my head on the wall for about 4 hours with this now, I cannot see why it wouldn't run, I have this in another component almost word for word the same without issue. If you could help me out you would save me a stroke. Thanks, Dom Re: Lithys 2016: Gyro/HP - Community Design of the Year Thanks Gordon! article:tag meta data Does anyone know where I can prevent the tags of an article being passed through to the meta data? We use labels to categorise our content in the IA but tags are used purely for internal tracking and I have just noticed that the tags are also being pulled into the list of article:tag that are generated in the meta data. Anyone know where I can control this? Thanks, Dom Translating dates We have the publication date of posts written like this in English: 08 January, 2015 Which is configured like this: <#assign posttime = rest("messages/id/${msg_id}/post_time").value/> <#assign postTimeObject = posttime?datetime("yyyy-MM-dd'T'hh:mm:ss") /> <p>${postTimeObject?string("dd MMMM")}, ${postTimeObject?string("yyyy")}</p> This works fine but is the same across all languages. We have publications in 5 languages all in all so we'd obviously prefer it if we could add in a way of rendering all dates in the relevant languages. I can't see anyway of doing it other than manually translating all the months, anyone had any similar experience with this? Thanks, Dom Re: .htaccess file for Lithium uploadNo they didn't but other than the PI tab in studio I don't know of any other way of doing the redirects.