YYHMedia Posted January 23, 2017 Share Posted January 23, 2017 I have a dropdown selector for a particular template/page type that allows me to select associated pages - in this case herbal ingredients. So on the page: https://theory.yinyanghouse.com/theory/herbalmedicine/tcm-formulas/shen-bu-xin-wan-calm-shen-and-supplement-heart-pills , for example, at the bottom you see "this formula has 8 ingredients" and then below that it links to all of those pages. This is created by going through the array $relherbs = $page->fherb_ingredients; What I would like is a field than when I edit the page that is dynamically created with some data from that array. Ultimately I would use this to cut and paste into another site for some related links. So a field that takes what I've selected in my dropdown list and does something like: show in field when editing go through the $relherbs array and show: $myherbs .= '<li><a href="' . $relherb->iherb_functional_grouping->url . '">' . $relherb->iherb_functional_grouping->title . '</a></li>'; I don't need or even want this field to be saved into the database, just shown in a field on the edit page. I could technically also do this by having it shown only to admins on the page itself - either way is fine. That seems like it would unnecessarily slow down page loads for no good reason though. This page seems close, but it's not quite what I want, particularly since I don't want it actually saved. Thanks for any help. Link to comment Share on other sites More sharing options...
MindFull Posted January 24, 2017 Share Posted January 24, 2017 5 hours ago, YYHMedia said: seems close, but it's not quite what I want, particularly since I don't want it actually saved. Then don't save it No, really though, if you want you can just delete/clear the field before save. Link to comment Share on other sites More sharing options...
Robin S Posted January 24, 2017 Share Posted January 24, 2017 6 hours ago, YYHMedia said: I don't need or even want this field to be saved into the database, just shown in a field on the edit page. Check out Runtime Markup: http://modules.processwire.com/modules/fieldtype-runtime-markup/ 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now