Timeline for How do I print custom user fields?
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 7, 2018 at 15:36 | comment | added | Mars | Does someone know how to get the isolated path to th profile? In order to fill an <a href= …> to wrap around the name. Would $node->getOwner()->link_path->value; do the trick? | |
Jan 18, 2016 at 15:22 | comment | added | Eyal | @kaleemclarkson I don't know. I only use sublime for small projects. You should upgrade to an IDE. | |
Jan 18, 2016 at 15:19 | comment | added | kaleemclarkson | @Eyal I mostly use sublime text 2. Is there a specific plugin that I need to make it work more like an traditional IDE? | |
Jan 18, 2016 at 3:13 | comment | added | Eyal | @kaleemclarkson if you add use type hinting then your IDE will be able to help you guess the available methods on an object. | |
Jan 18, 2016 at 3:11 | comment | added | kaleemclarkson | hahah thanks sir! that is awesome :) Well I just added yours to my Dropbucket. Its a cool place for Drupal snippets dropbucket.org/node/7235 | |
Jan 18, 2016 at 3:02 | comment | added | itsdarrylnorris | "D8 API for the correct functions"... hahaha... I do not know. I know this because I'm working on contrib theme. And I ask a similar question before so I have plenty of examples in my working theme. | |
Jan 18, 2016 at 1:39 | vote | accept | kaleemclarkson | ||
Jan 18, 2016 at 1:38 | comment | added | kaleemclarkson | You rock sir!!! For future reference. When looking to get access variables from other entities, where would I search in the D8 API for the correct functions? | |
Jan 18, 2016 at 1:13 | comment | added | itsdarrylnorris |
Oopss.. the $node = $variables['node']; need to be inside of the preprocess function. Sorry, I have fixed in my answer.
|
|
Jan 18, 2016 at 1:12 | history | edited | itsdarrylnorris | CC BY-SA 3.0 |
Fixing the error.
|
Jan 18, 2016 at 1:06 | comment | added | kaleemclarkson | Thanks for the quick reply but your solution just gave me white screen. Is there another example on how I would print information from the node Author? | |
Jan 17, 2016 at 22:19 | history | answered | itsdarrylnorris | CC BY-SA 3.0 |