viewer URLs

6 posts by 2 authors in: Forums > CMS Builder
Last Post: June 11, 2008   (RSS)

By rita - June 10, 2008

So far so good with CMS, but one snag I've run across regards the "viewer URL".

I don't think I quite understand how these are linked, as I've tried different things and can't bring up a review of content page I've created. Obviously it would be good to have this for non-techies who could review content without fiddling with any code.

This is what I did, which doesn't work:

I go to Admin > section editors & this brings up a list of menu names I've created. So far, so good. Then I click "modify" as an action for "About Us", then click "viewer URL" where I enter "/aboutUs.php" [file I uploaded].

Under Admin > general settings I go to "'View Website' URL" and entered "/cmsViewer" [directory I created to upload viewers to].

I've tried various versions of this, and can't bring up the page. What am I missing? How are these 2 connected? Thanks in advance!

Rita

Re: [rita] viewer URLs

By Dave - June 10, 2008

Hi Rita,

The "Viewer Url" is what list pages use to link to detail pages with the _link placeholder. It's also how detail pages link back to list pages with _listPage variable.

The "View Website" url is the link that is used for the "View Website >>" link in the top right corner of the CMS admin program.

I hope that helps, if your links still aren't working feel free to post the urls and I'll take a look.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] viewer URLs

By rita - June 10, 2008

So if I understand, clicking the "View Website >>" link in the top right corner should bring up the webpage I am currently working on, to give me a preview of what that one page will look like on the web? I'm assuming this is there to allow non-techies to preview the page to see if they want to keep it as-is?

Rita

Re: [rita] viewer URLs

By Dave - June 10, 2008

Rita,

No, it's much more simple than that. It's just a predefined link to your website homepage (or wherever else you want to link to).

We don't have a "preview" or "Show me this page on the website" feature yet. Although with the viewer urls recently added we could certainly add that soon.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] viewer URLs

By rita - June 11, 2008

Ah, no wonder I was confused -- I was just trying to make things more complicated than they really are. Not the first time ;-)

So now the other thing I need is an example of how the "Viewer URL" is used.

The description in CMS says "These urls are used when creating links to viewers for this section." Are these "viewers" pages which I create & upload? Are they the actual website page? Is that it, or am I making things more complicated again?

Re: [rita] viewer URLs

By Dave - June 11, 2008

The viewers are PHP pages which you create and upload. You might have the following pages:

newsList.php - a list of news items
newsDetail.php - show details on _one_ news item.

When you go to newsDetail.php you can put a number of the end of the record number you want to view, like this:

newsDetail.php?33 - Display news record 33

You could manually create that link in newsList.php like this:

<a href="newsDetail.php?<?php echo $record['num']">link</a>

But to make it easier for you we automatically create a special field called _link that has the "viewer url" and number in it (as well as some extra title text for search engines). So using _link your link looks like this:

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

But since you can create an unlimited number of viewers we don't know where to link to find the news detail page. So that's why we let you specify the viewer urls in the admin section.

That last bit of code might create a link like this:

http://example.com/newsDetail.php?News-title-goes-here-33

Hope that helps. Let me know if I can provide more detail or clear up anything else. :)
Dave Edis - Senior Developer
interactivetools.com