Ho guys, i need help for a thing, when I create a course, in te course list when I click the course name it send me correctly on the node page.
Now in the node page I will add a small snippet of code in the page body that will link to the Classroom page. Maybe using the node nid. I'm not a php programmer so if Simeone could help me it's very appreciated :)

The situation that I would obtain is this:

Think this is a Node page:

Node title
Description of the node
Course start / end
Snippet :Go to classroom

In few words I would replicate the course link appearing in course list but inside a node :)

Merry Xmas to all :)

Comments

GolDRoger’s picture

I found a solution after a long search, with this snippet placed inside the body of the page give me a button for going directly into the url of the course this is the snippet:

if anyone have a better version of code please correct it and let me know :)

<a href="<?php global $base_url; print $base_url; ?>/classroom/course/<?php if (arg(0) == 'node') { $nid = arg(1);} print $nid ?>"> GO TO CLASSROOM </a>

The main problem is one: the link stay visible in all the pages, and i have no idea how to make them visibile only in all pages except under /classroom/course/x

wjaspers’s picture

Category: support » feature

I think the "classroom" front should be promoted or at least given a node based or system-based option to determine which is first.
Shouldn't take much to change it. The node_api and a the value of a variable() should be enough to accomplish this.