Manage "View Websiite" URL

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 8, 2009   (RSS)

By crawf - April 7, 2009

What I have done is to change the view website url for some users to a specific url for each user by editing header.php as shown in other posts.
if ($username == 'sample') { $viewUrl = "http://sample.com"; }

However for other users, I want to change it to the url of the details page for the current section editor they are using. That also seems easy to do provided that there is a variable whose scope includes header.php and which contains that url. Hopefully we can do something like:
if ($username == 'sample2') { $viewUrl = $current_detail_viewer_url; }

Is such a variable available?

Re: [ross] Manage "View Websiite" URL

By crawf - April 7, 2009

Thanks! Works like a charm! A bit awkward but it does the job.

I'm aware that I need to save the mods and insert them into the next update. Inconvenient but not a big problem compared to the benefits I can get from it.

It would be nice if CMSB had a hierarchical assignment of the view website url. If there was a field for a viewing url and a field for viewing choices in the user account setup, then there could be a choice of using the default url from settings, using a url specified for the user, or using the url from the section viewer url (which CMSB could presumably get easily from the schema files).

Re: [crawf] Manage "View Websiite" URL

By ross - April 8, 2009

Hi there.

Glad that worked. I do like the idea of being able to change that view website link on a per section basis. I am adding that to the list and we'll see what the options end up being.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Manage "View Websiite" URL

By crawf - April 8, 2009

I'll look forward to seeing how it turns out.