frankiewebs
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Help Displaying a FieldProducts are currently only linked to lots. Lots are linked to rooms. I would like to have the current product show up on the room post, by displaying the current_product field from the current lot. That way, if I update the current lot of a roome, the current product will update as well.
I hope this is more clear. Thank you!
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] SQL Query ConditionalThat did the trick, Scott. I also used the rewritten query you supplied. Thank you for your lightning fast response!
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] SQL Query ConditionalAlso tried a slightly different approach that yielded the same unknown column error.
SELECT posts_lot.post_title AS lot_post_title, posts_lot.ID AS lot_ID, posts_lot.post_content AS lot_post_content, lot_meta_lot_status_tbl.meta_value AS lot_meta_lot_status, lot_meta_room_tbl.meta_value AS lot_meta_room, lot_meta_product_tbl.meta_value AS lot_meta_product FROM fzMCGsSFposts AS posts_lot INNER JOIN (SELECT lot_meta_lot_status_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_lot_status_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_lot_status_tbl_posts ON lot_meta_lot_status_tbl_postmeta.post_id = lot_meta_lot_status_tbl_posts.ID AND lot_meta_lot_status_tbl_posts.post_type = 'lot') AS lot_meta_lot_status_tbl ON lot_meta_lot_status_tbl.meta_key = 'lot_status' AND lot_meta_lot_status_tbl.id = posts_lot.ID AND lot_meta_lot_status = '1199' INNER JOIN (SELECT lot_meta_room_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_room_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_room_tbl_posts ON lot_meta_room_tbl_postmeta.post_id = lot_meta_room_tbl_posts.ID AND lot_meta_room_tbl_posts.post_type = 'lot') AS lot_meta_room_tbl ON lot_meta_room_tbl.meta_key = 'room' AND lot_meta_room_tbl.id = posts_lot.ID INNER JOIN (SELECT lot_meta_product_tbl_posts.ID as id, meta_value, meta_key FROM fzMCGsSFpostmeta AS lot_meta_product_tbl_postmeta INNER JOIN fzMCGsSFposts AS lot_meta_product_tbl_posts ON lot_meta_product_tbl_postmeta.post_id = lot_meta_product_tbl_posts.ID AND lot_meta_product_tbl_posts.post_type = 'lot') AS lot_meta_product_tbl ON lot_meta_product_tbl.meta_key = 'product' AND lot_meta_product_tbl.id = posts_lot.ID WHERE 1=1 AND posts_lot.post_type = 'lot'
Thank you for the reply. For posterity, I’d like to share how I resolved this. I used a Pod template as you recommended. I set my IF statement to check for the field “related_status”, and for each value, set a div class. Then I put all the content inside the div (see below). Then, finally, I used CSS on the page itself to target the div class .stoppage and set background color along with some other stuff.
[if field=”related_status” value=”457″]
<div class=”stoppage”>
<h3>{@name}</h3>
CURRENT STATUS: {@related_status}<br>
STOPPAGE CAUSE: {@stoppage_cause}
PRODUCT: {@related_product}
TEAM LEADER: {@team_leader}
TIME IN CURRENT STATUS: 52:15
</div>
[/if]`- This reply was modified 2 years, 6 months ago by frankiewebs.
- This reply was modified 2 years, 6 months ago by frankiewebs.