Alternate preview / page link

4 posts by 3 authors in: Forums > CMS Builder
Last Post: October 17, 2012   (RSS)

By mediaco - October 16, 2012

I have a list of pages (multi-record) and have the detail and preview pages information set accordingly.

Is there any possible way in the CMS, in the list view I could provide a direct link to the page? Opening in a new window/tab?

At the moment it shows the _link but it's not clickable.

Anyone else ever encounter this?

Re: [mediaco] Alternate preview / page link

Hi Mediaco,

I'm not sure why your _link is currently not clickable, would it be possible to copy your code so far into a post for me?

Have you set up detail and list page viewer URL's for the section in the CMS Admin area? You can set these up by going to your CMS Admin area and then your section editors tab. Next click the modify link for the section you want to set up your _link for. Then click the Viewer URL's tab at the top of the section editing page. In this tab the second text box down should be called detail page URL, and you should add the details page file name in here.

Something like this should make links open in a new window for your list page:

<?php

list($recordVariable , $recordVariableMetaData) = getRecords(array(
'tableName' => 'tableNameHere',
'loadUploads' => true,
'allowSearch' => false,
));

?>
<?php foreach ($recordVariable as $record): ?>
<h3><?php echo htmlencode($record['title']) ?></h3><br/>
<br/><a target="_blank" href="<?php echo $record['_link'] ?>">Read More</a><br/>
<hr/>
<?php endforeach ?>


The target="_bank" will ensure that the link is loaded into a new window.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [mediaco] Alternate preview / page link

By Jason - October 17, 2012

Hi,

CMS Builder currently doesn't support detail page links from inside the CMS by default.

This could be accomplished with a custom plugin however. If you are interested in getting this, please send an email to consulting@interactivetools.com and we can go over some options.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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