inherit
Head of the Emu Preservation
Head of the Emu Farmers Association
13398
0
Jul 12, 2020 14:15:37 GMT -8
Joshua Farrell
7,964
September 2003
dentist
|
Post by Joshua Farrell on Feb 15, 2019 11:59:09 GMT -8
So, I have been working on making a plugin, and finally remembered how to insert plugin data in various forms in the plugin into the global headers and footers, but my question is this: how do you call up that same data, without using the global headers/footer and insert the data directly into the template?
Also side note I will probably will need to figure out eventually, is how do I use the autoform data (like how the Sidebar Redux does it) and insert it into the forum, and do so without it being user editable?
I just need a couple of tips on how to do the above, so that I can stop wasting my time digging for vague information through old threads.
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Feb 15, 2019 12:33:45 GMT -8
So, I have been working on making a plugin, and finally remembered how to insert plugin data in various forms in the plugin into the global headers and footers, but my question is this: how do you call up that same data, without using the global headers/footer and insert the data directly into the template? Layout templates don't have access to plugin data. The plugin would either need to insert that data into its own header/footer component or add it to the page after it loads through the use of JavaScript. Also side note I will probably will need to figure out eventually, is how do I use the autoform data (like how the Sidebar Redux does it) and insert it into the forum, and do so without it being user editable? All plugin data is in a read-only state unless you specifically design the plugin to include user-editable elements, but even then the only thing that can be edited by a user is plugin key data which does nothing until you use it to determine the plugin's output on the page. You can look at the header/footer components within the Build section of the Sidebar Redux plugin to see how it loops through the autoform variable to output containers.
|
|
inherit
Head of the Emu Preservation
Head of the Emu Farmers Association
13398
0
Jul 12, 2020 14:15:37 GMT -8
Joshua Farrell
7,964
September 2003
dentist
|
Post by Joshua Farrell on Feb 15, 2019 12:37:48 GMT -8
Ah ok. I'll take a look at how that plugin was done to get an idea on how to do it.
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Feb 15, 2019 12:42:46 GMT -8
The autoform for the left sidebar has the variable ID left_sidebar so it uses a foreach statement to loop through the object contained within that variable.
Each field within the autoform also has its own variable ID. The one that controls the content area of each container uses the ID content so we can include that in the loop to output each row's content.
|
|
inherit
Head of the Emu Preservation
Head of the Emu Farmers Association
13398
0
Jul 12, 2020 14:15:37 GMT -8
Joshua Farrell
7,964
September 2003
dentist
|
Post by Joshua Farrell on Feb 16, 2019 15:54:51 GMT -8
Taking a look through that, and what you posted, I think for now I have figured out what I need to use to fetch the data and insert it into a div box.
|
|
inherit
Head of the Emu Preservation
Head of the Emu Farmers Association
13398
0
Jul 12, 2020 14:15:37 GMT -8
Joshua Farrell
7,964
September 2003
dentist
|
Post by Joshua Farrell on Feb 19, 2019 22:15:00 GMT -8
The autoform for the left sidebar has the variable ID left_sidebar so it uses a foreach statement to loop through the object contained within that variable. Each field within the autoform also has its own variable ID. The one that controls the content area of each container uses the ID content so we can include that in the loop to output each row's content. This worked for the autoform data, thanks! Took me a little bit of tinkering to figure out how the data was shown in conjunction with the sidebar plugin. Should have figured it was something that easy to do.
|
|