How Random Babbling Becomes Corporate Policy (t3knomanser) wrote in component_help,
How Random Babbling Becomes Corporate Policy
t3knomanser
component_help

  • Music:

Request...

I've been touching up the code from previous tutorials that I've incorporated. And I noticed that I was certainly inputting my username alot, which struck me as pretty silly; shouldn't S2 be smart enough to figure that out?

So, I checked the docs, and replaced all those places where I had to put my username with $p.journal.username. And in the profile component, I noticed that I could use a smiliar technique to get my website URL and name from my profile, avoiding hardcoding. ($p.journal.website_name and $p.journal.website_url). I was wondering if we could start using that in our tutorials to make "no-rewrite" components and patches? Maybe edit a few of the existing tutorials as well?

Also, The doc on the user-class and on the page class can help find other places to change that.
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments