Greetings,
I am making a theme that will be re-used by a hundred sub nations. I have to keep the theme elements LOCKED because I don't want any one of them making a change to the theme that will show up on the other ninety-nine sub nations.
Each sub nation will have their own individual twitter handle and most of them will want their twitter feed in the sidebar.
Because twitter deprecated their v1 script, the only way to get the new script is to go to https://twitter.com/settings/widgets and generate a new one for each twitter handle. There's no way to automate this (that I know of, anyways).
I want each of the sub nations to be able to put their twitter widget into the sidebar of _columns_2.html without giving them access to the theme.
Ideally, I'd like to have each sub nation user put their twitter widget on something that could be pulled in automatically. Like, for example, an include file, that could be called.
Is it possible to make ONE include file accessible for editing without unlocking the ENTIRE theme?
Would some other method work better?
Thank you!
Hi Tim,
You can actually share themes without making them editable to the nations you share it with; simply uncheck the "Nations I have shared this theme with can also edit it" option on the custom theme settings page:
Barring that, you would need some logic within the _columns_2.html template to look at the URL of the site (in JavaScript that'd be window.location.href) and to insert a different twitter widget (perhaps using jQuery's .html() function) based on the nation it's on.
Showing 4 reactions
Sign in with
(Note: this will not work if you copy and paste)
<a class=“twitter-timeline” href=“{{ broadcaster.twitter_profile_url }}” data-widget-id=“46964830029xxxxxxx”>Tweets by @{{ broadcaster.twitter_login }}</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)0,p=/^http:/.test(d.location)?‘http’:‘https’;if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,“script”,“twitter-wjs”);</script>
Then you could share the theme while locking it to keep others from being able to edit it (as Tianhe mentioned).
Tim Wayne
Certified Architect
Certified Expert
• I share the theme with user A, B, C, D and E.
• I make theme editable by users
• user B makes an edit to layout.html
• user C makes an edit to _columns_2.html
Result:
User A, B, C, D, and E will see the edits B and C made on their own respective Nation.
I don’t understand the alternative you described, with JQuery. If you could elaborate, that would be awesome.