On Mon, Jun 13, 2011 at 9:39 AM, shelan Perera <shela...@gmail.com> wrote:
> Hi Devs,
>
>  In Roller we can create custom templates to a weblog and access them using
> a link like http://rollerweblogger.org/roller/page/archives.Since  Roller
> does not care about the rendering device at the moment it will render the
> same template if viewed in a mobile device also.
>
> But having separate mobile rendering capability, we have to have templates
> that can render in mobile devices as well as Desktops.Here are the possible
> solutions that i have thought of.
>
> 1. Having 2 separate templates as , one is for standard and other one is for
> mobile.So a custom template page designer can create mobile optimized view
> as wish and have a separate one for desktop standard.But viewer will see no
> difference in the page link.
>
> So a template will have a type defined as standard for desktop and Mobile
> for mobile devices.
>
> There is a problem as we cannot have 2 templates using same link and if we
> are going to allow this we have to change getPageByLink() to
> getPageByLinks() which will return a list of available pages. (but with
> different types.) so render it according to the device.

To me this seems like the best approach. I wonder how this would work
in the Admin UI.Here are two possible approaches:

a - User manages separate templates. If a user wants a page called
"archive" to appear in standard and mobile themes, he create two pages
both named "archive" but with different types, standard and mobile. In
the Templates page, we would add a new column for "Type" and all
templates, regardless of type would be listed on the page.

b - Roller manages separate templates. When a user creates a new
template called "archive" Roller shows the user a Template Edit page
that has different tabs for different types of template text. In the
Templates page, the "archive" page would be shown as one item in the
list, but in reality there would be 2 different templates.

I think I prefer b.

Thanks,
Dave


> 2. We define the type to a template page as we do in the earlier.But
> preserving unique link for a template feature we can create another custom
> template with a predefined suffix and then render it to user.
>
> As an eg:
>
> We create template X having the link /page/link. if the type is mobile we
> add the suffix .mobile   so link will be modified as
>  /page/link.mobile (This will happen internally)
>
> if type is standard we keep the original link. (/page/link)
>
> So at the time a user ask for /page/link  when we identify the request comes
> from a mobile device we will look for the template with   /page/link.mobile
> first and if it is not available we will render the default one (standard).
>
>
> I would like to have some suggestions and feedback on the above mentioned
> ideas and really appreciate it.
>
> Thank you
>
> --
> Shelan Perera
>
> Home: http://www.shelan.org
> Blog   : http://www.shelanlk.com
> Twitter: shelan
> skype  :shelan.perera
> gtalk   :shelanrc
>
>  I am the master of my fate:
>  I am the captain of my soul.
>         *invictus*
>

Reply via email to