Add "link to page/file" in custom block

Permalink
Hey guys(girls),

I created a few blocks to display content in a custom layout such as a newsitem.

In a newsitem block for example; I now have a link inputbox which can be filled in manually. Does anyone know how I can get a 'link to page' or 'link to file' which should open the sitemap or filemanager to select a file and then selects the path accordingly?

(compareable to the 'link to page' function above the contentblock's wysiwyg editor)

Would be a major step in usability towards my client and other concrete5 users.

Thanks in advance!

- Robert

RobertJNL
 
RobertJNL replied on at Permalink Reply
RobertJNL
Solved the file linking by integrating concrete's file block into my customized block (needed some edits on database and function names).

Still looking for page linking though :)
GavMurphy replied on at Permalink Reply
GavMurphy
Did you solve the block editor to display a site map style 'page selector' tool? I'm building a custom block myself that requires the user to manually link to another page on the site, but don't know how to pull up the same sort of page selection tool as found in the default C5 content editor...Cheers. Gav
TheRealSean replied on at Permalink Reply
TheRealSean
This should do it
<?php echo Loader::helper('form/page_selector')->selectPage('targetCID', $targetCID); ?>
GavMurphy replied on at Permalink Reply
GavMurphy
You star. Yes, indeed. Is this in the Dev Documentation area and I just missed it? Just came across it looking in the files as your reply came through - thanks.
TheRealSean replied on at Permalink Reply
TheRealSean
Its hidden in there, but they have some info on the widgets page,

http://www.concrete5.org/documentation/developers/forms/concrete5-w...
drbiskit replied on at Permalink Reply
drbiskit
Hi - Just trying to implement this and having a bit of an issue in that it is storing my page selection, but then returns the page ID + this doesn't then really work as it gives me back eg. mydomain.com/77. I'm probably missing something really obvious - but any pointers about how to convert the ID back to a SEFurl would be great.

Cheers.
drumrby replied on at Permalink Reply
drumrby
Where exactly do you add this code? In add.php? Do I need to tie it to the database?