Viewer URLs - 2 destinations for details page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 1, 2015   (RSS)

By Damon - April 30, 2015

Hi Ted,

I want to use the same data and listings page for 1 web and 2 mobile.  

Basically a second details page from the same data.  In viewer urls there is only one file accepted I believe.

Is there a solution?

Yes there is a solution.  

By default, you can automatically create a link to the detail page like this:

<a href="<?php echo $record['_link'] ?>">Read more...</a>

And this would create code like this:

<a href="/article.php?Example-article-3">Read more...</a>

But you can create as many additional links to other detail templates by creating the same link with available variables. 

Here is some example code:

<a href="/mobile_article.php?<?php echo $record['_filename'] ?>-<?php echo $record['num'] ?>">Read mobile version ...</a>

And this would create code like this:

<a href="/mobile_article.php?Example-article-3">Read mobile version ...</a>

Now you can add in as many different detail page templates as needed and create links to each.

Hope this helps. Let me know if you have any questions.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Thank you