Simple change in Pager.cshtml

Topics: Administration, Customizing Orchard, Localization
Jun 7, 2013 at 8:26 AM
Edited Jun 7, 2013 at 8:33 AM
Hello everyone!

I must change pager text on blog posts. On my site there are two blogs. I would have two different pager texts, for example: Newer Blog1, Newer Blog2, Older Blog1, Older Blog2.

I can change pager text, but two blogs will have the same pager text.

Can I place here something like:
if (Model.ActualUrl.Contains("xyz")) Model.PreviousText="xyz" else Model.PreviousText = "abc".

But how to get actual Url ? Maybe there are best solutions for do something like this.

This is pager.cshtml file, where I made changes.
    Model.Quantity = 0;
    Model.PreviousText = "Newer Blog1";
    Model.NextText = "Older Blog1";
    Model.Metadata.Type = "Pager_Links";
Jun 7, 2013 at 11:51 AM
have you tried to use url alternates?
Jun 7, 2013 at 12:15 PM
Edited Jun 7, 2013 at 12:16 PM
Can you tell me something about it? These line is my first modification in orchard, and i doesn't know too much about it :(
Model.PreviousText = "Newer Blog1";
Jun 7, 2013 at 6:16 PM
Nick is suggesting that you create two pager templates: one for url xyz, and another for abc, e.g.:


The documentation explains how alternates work.
Jun 10, 2013 at 6:18 AM
Thanks a lot, I'll try to do this :)
Jun 10, 2013 at 10:22 AM