Board Thread:General Coding Help/@comment-5754239-20170629030908/@comment-27958705-20170630133907

You can't get extension (ref) content. It is changes to guid before processing in module\template and changes back when page renders.

All what you can get in module\template (underscores used to prevent rendering code to actual ref): _'_"_`_U_N_I_Q_e_e_3_c_9_d_f_4_0_6_2_b_3_-_r_e_f_-_0_0_0_0_0_0_0_2_-_Q_I_N_U_`_"_'

So you can only detect extension (ref, gallery etc), not actual content.