Custom Block requires a Page Selection tool or helper
Permalink
I'm building a custom block for C5 that has a simple:
Header
Description
Link
I know I can engineer this so that I put the Description as a page attribute of the destination page and pull the Header/Title too along with the PageID to create the link, BUT...I need to have complete control over the origin in terms of order (as these are teasers on landing pages) and also some of the teasers won't be to pages on the C5 site, so the Link is actually going to be 2 fields (one to an external URL and one to an internal). I know you can do page referrals to external pages, but it gets too messy for the CMS user.
So I need a Page Link selector tool like you find on the standard Content Block editor above the main TinyMCE section, which brings up a site map from which you can select a page for your link.
Any ideas???? Is there a helper for this?
Header
Description
Link
I know I can engineer this so that I put the Description as a page attribute of the destination page and pull the Header/Title too along with the PageID to create the link, BUT...I need to have complete control over the origin in terms of order (as these are teasers on landing pages) and also some of the teasers won't be to pages on the C5 site, so the Link is actually going to be 2 fields (one to an external URL and one to an internal). I know you can do page referrals to external pages, but it gets too messy for the CMS user.
So I need a Page Link selector tool like you find on the standard Content Block editor above the main TinyMCE section, which brings up a site map from which you can select a page for your link.
Any ideas???? Is there a helper for this?
You should check out the Designer Content addon in the marketplace -- it's a free addon that automatically creates custom blocks like what you're describing:
http://www.concrete5.org/marketplace/addons/designer-content...
The current version in the marketplace however only offers links to other pages in the site (not external links). But there's a new version which I haven't yet updated in the marketplace which does offer the option of internal and external links (you'd have to create 2 fields -- one internal and one external, and tell the user to either fill out one or the other). If you're feeling adventurous you can download that from here:
https://github.com/jordanlev/c5_designer_content...
(scroll down the page a bit for installation instructions)
(and I haven't gotten any reports from beta testers about major problems so it's relatively safe to use at this point I'd say, despite all of the scary warnings).
-Jordan
http://www.concrete5.org/marketplace/addons/designer-content...
The current version in the marketplace however only offers links to other pages in the site (not external links). But there's a new version which I haven't yet updated in the marketplace which does offer the option of internal and external links (you'd have to create 2 fields -- one internal and one external, and tell the user to either fill out one or the other). If you're feeling adventurous you can download that from here:
https://github.com/jordanlev/c5_designer_content...
(scroll down the page a bit for installation instructions)
(and I haven't gotten any reports from beta testers about major problems so it's relatively safe to use at this point I'd say, despite all of the scary warnings).
-Jordan
Thank you Jordan for your Link - i didn't metioned this featured block!
I'm new to C5 and switched from a other CMS that dev is slack...
im very happy to found such a real surprising CMS like C5!
Best Regards Martin
I'm new to C5 and switched from a other CMS that dev is slack...
im very happy to found such a real surprising CMS like C5!
Best Regards Martin
Problem resolved - discovered the helper page_select and it seems to do what I need. Thanks for the help and suggestions. The C5 community are very helpful, fast and pro-active. Very enjoyable.
http://www.concrete5.org/community/forums/customizing_c5/add_andquo...