Editing an article

Hi,

I have some questions about editing an article and hope you can help me!

  1. I have an article which was made 9 months ago, but when I’m editing this article, it is not shown on the top of the newsfeed. Isn’t it logical to think that when you edit an article it would be updated with that new date (when you did the editing), and then be on top of the newsfeed?

  2. Is it possible to have pictures in an article further in the margin, so that the text and the pictures are all the way to the left. See my attached pictures.

Hello

  1. It’s up to you how to sort the articles in the list. If you want to sort them by modified date then you should implement sorting in the part that renders the list of articles (the field is called “modifiedTime”).
    Here you can read how to sort the results of a query: http://repo.enonic.com/public/com/enonic/xp/docs/6.11.1/docs-6.11.1-libdoc.zip!/module-content.html#.query. The code snippet there even shows how to sort by “modifiedTime”.

  2. Again, the layout is up to you. What you need to do is apply a margin to that element in your site’s stylesheets (CSS files).

Hi Christine

  1. The sorting in your newsfeed simply depends on how your site was configured. If it is set to order by “publish time” then an update won’t affect the sorting. However sorting may also be set to use “modified”, “publish time”. I believe that will solve your problem.

  2. If you insert images in the editor, there are four options: “justified” filling the entire column, “centered” (which this looks to be using" and “right” and “left”. I propose you use the “justified” option for most cases. Optionally left, but this will also cause the text to flow around the right side of the image. We are working on image styles for upcoming versions of Enonic XP where you may defined image styling to any requirements.

Hi Christine,

Glad to see some editorial questions here! =)

A lot of great answers already. But to me it sounds like the developer here have built the sorting this way, so if you try to change the sorting and still don’t get what you need, have a talk to your developer to change how it works.
However, please consider this - Imagine seeing a spelling error in an article that is one year old, fixing that, and suddenly the article is front side news again. If you are ok with this, then such a sorting you request is possible for a developer.

For the second one it looks like this is also developer work, the design of the website is forcing this margin and overwrites XP. Can you post a picture from how it looks inside the text editor in Content Studio? Because all articles with pictures will get this margin right?

Do try the suggestions from Thomas and Alan, and for the things you can’t get to work, inform your developer for doing these changes for you. Most things are possible for a developer to change into what you need in XP.

Best regards,
Bobby

1 Like

Hi Bobby,

Thank you for the feedback.
Our problem is that we don’t have a developer who is helping us. I get help from a colleague in the eCommerce department here at Color Line.

But here you have a picture from inside the article in content studio, where I’m uploading the picture;

Hi again,

Thanks, great. Can you also click “Insert” button and then take a picture of how it looks when the image is inside the area with the text? Is there a margin there too? If not, this is some styling the developer has put on the website.

Best regards,
Bobby

The problem is that you “tick” keep original size when inserting the image. This will prevent the picture from scaling.

This is what I see when I try to sort. There is nothing there called “Modified - publish time”???

Even if you do a sorting in admin, this can be overridden by the presentation parts/pages made by the developer. Also, I see we could provide more sorting options for content editors anyhow.

1 Like

So I should NOT use “keep original size” on these to pictures? Is that what you are saying?

Jup. Original size checkbox should only be used if you want to show a picture in original pixels, suitable for things like icons for instance.

I tried this now, and this is how the article is when I previewed it. The pictures only got larger, but it is this not all the way to the left, like I wanted it to be?!

Hi again,

Christine, please keep using the “Keep original size” as before. The margin to the left is hard coded into the design. Only a developer can change this. The same goes for the sorting. You can’t affect this from inside XP, it’s all controlled in the code of your website.

I will get back to you on this.

This is relevant https://github.com/enonic/xp/issues/5517
There is also some example code in there.