Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]

Author Topic: [MOD] Body and ID, a modification I need help with!  (Read 15138 times)

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #45 on: April 02, 2006, 10:59:15 pm »

Quote from: JM
I've tried this too, and I've got a few questions:

- Tjobbe, did you use or did you code the navigation (Home Blog Webdesign Contact) yourself?
- Will it be possible to code sNews in a way that it can do this itself? So if you're in category Home, then in which is the navigation the Home link will have a different look than the other categories' links?

I hand-coded the navigation myself, so that I could add an id to the url itself.
Logged

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
[MOD] Body and ID, a modification I need help with!
« Reply #46 on: April 03, 2006, 12:17:07 pm »

Ah ok, that's what I thought.

As a simple learning coder I was thinking:
With Tjobbe's idea, can you include a code in sNews' // CATEGORIES where it does something like

Code: [Select]
if {
    =     '  .$r['name']. '  {        // it uses r['name'] for name of category I believe
    echo "class='active'";
  }
else {
    echo "";            // I'm not sure if you even need this line
  }
}
my simple explanation: it checks the ### and, when the name of the category that sNews wants to display equals the body id ###, it echoes class='active' and then of course the .active would have a different look than the other
  • tags.

    I hope this explanation is understandable haha, I hope there is a way to do this,
    but then the above code in correct PHP (but since I'm a learning PHP coder...) of course.
  • Logged
    Pages: 1 2 3 [4]