Both suitable for different niches. Though I love second one, I will be choosing first as it is more suitable in my kind of forum.
html widgets can access template data in 1.6.1
-
-
@djensen47 can you give some more details? What page are you looking at etc
-
I'm trying to insert some template data into an html widget. I'm currently looking at the homepage while testing this.
.... oh. But I'm still not sure how to get the user data like username.
-
@djensen47
ajaxify.data.loggedInUser.username
would beloggedInUser.username
in the template context. -
@PitaJ That didn't seem to work. On the home page (list of categories)
ajaxify.data
shows up as:The only page (so far) that this seems to work on is a topic page.
-
@djensen47 oh, huh. Appears
loggedInUser
isn't defined on the home page (/category listing). Odd. In that case, you'll have to provide that data yourself by hooking intofilter:<abc>.render
or adding the info to the widget itself.Otherwise you'll have to bug us to add that into core.
-
@PitaJ said in html widgets can access template data in 1.6.1:
adding the info to the widget itself.
I'm using the HTML widget, is there another way to get this data into the HTML widget?
-
@djensen47 Not at this time AFAIK
-
Looks like I can do it with JavaScript.
-
But lemmie tell you writing Javascript inside an HTML widget is a Pain In The Neck.