Highlighted

How to make NEW page to appear first

Avatar

Avatar

sd36462524

Avatar

sd36462524

sd36462524

25-09-2018

Hi All,

I work on recipe pages, we have different categories under Kitchen(Ex: cupcakes, pies), I have added new cupcake recipe  under kitchen and added tag cupcake the recipe which i added is appearing in cupcakes category but it is appearing in third page under cupcakes category, how do I make it appear in first page under cupcakes category., is there a way to change the order like last modified/added to appear first?

According to the tag which we provide in page properties recipe page appears in that particular category but how do we make sure newly added recipe to display firstin the category?

Thanks!

Replies

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

25-09-2018

Can you explain more, where exactly you need sorting inside Tagging or site? Screenshot would be helpful.

Highlighted

Avatar

Avatar

sd36462524

Avatar

sd36462524

sd36462524

25-09-2018

Hi Arun,

For example if we go to hersheyskitchen.com

recipes->cakes and cupcakes the product which is showing up in page 27 chocolate peanut butter cupcakes is recently added I want that product to show up  in first page in cakes and cupcakes category, all the recipes are created under kitchen as we are adding tag cupcakes it is visible in cupcakes and cakes section.

How can I can do it? do we need to right a code or something to make last modified to appear in the first page.

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

25-09-2018

Hi,

How to add new items in the page? Is it fetching items from somewhere or is it created using component dialog or for each item there is a component. To sort you have to find out something like modified date or created date of node/items, based on that you can sort or if it is based on last added first display then you can just reverse your list while displaying.

Without knowing authoring part, can't suggest appropriate approach.

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

25-09-2018

Are you referring to a result set or a component where a collection of results is showing up.

Highlighted

Avatar

Avatar

sd36462524

Avatar

sd36462524

sd36462524

25-09-2018

@ smacdonald2008 I am referring to where collection of results is showing up

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

25-09-2018

In that case - if you result set is retrieving nodes - then order them using a date and then place into a map and then display them by that order.

Highlighted

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

26-09-2018

Is there a query search in your backend code to populate this information ? I assume that when the user hits Cakes & Cupcakes Recipes | Hershey's Kitchens this page , your listing component is sending an Ajax call to https://www.hersheys.com/content/kitchens/en_us/recipes/cakes-cupcakes/jcr:content/main_parsys/genera... . I am not sure how you have handled the logic in the backend, but I assume, if you can sort the JSON before sending the response in the order of last modified  , could be that your problem will be solved

1579939_pastedImage_4.png

Thanks

Veena

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

26-09-2018

Yes, Veena is right, you can sort JSON response and return new response based on your requirement.

Highlighted

Avatar

Avatar

sd36462524

Avatar

sd36462524

sd36462524

26-09-2018

Thank you everyone.