How can I get forum name removed from page

Started by ChipsXJ, November 18, 2012, 01:41:16 AM

Previous topic - Next topic

ChipsXJ

Can anyone tell me how I can remove the forum name from my pages (the red square in the picture)?
Using the 'gone fishing' template.
Thanks
Chips

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Hj Ahmad Rasyid Hj Ismail

Isn't that the linktree? Why must he be directed to get support from the theme maker? That is IMO belongs to SMF support or at least a SMF coding discussion.

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Hj Ahmad Rasyid Hj Ismail

Hey, no need to apologize Colin. I might just do the same thing. Just look into it and see how we can resolve this. ;)

Colin

OP, from your site it looks like you already removed it. Is that correct?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

ChipsXJ

yes with the help of 'The craw'.

Thanks

Quote from: The Craw on November 18, 2012, 11:13:32 AM
Quote from: ChipsXJ on November 18, 2012, 10:48:02 AM
Hope someone is still lurking here to help me with this one. I was redirected here from the "SMF Coding Discussion" page.

Can anyone tell me how I can remove the forum name from my pages (the red square in the picture)?
I have been searching for it a while......very new to css and having tough time understanding how it works compared to HTML. Using the 'gone fishing' template.
Thanks
Chips

In ~/Themes/GoneFishin/index.template.php, find this around line 293:

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)


Just before that, add this bit, which shifts the forum name off the link tree.

// Take off the forum name and assign it to this variable.
$forum_name = array_shift($context['linktree']);


Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

MrPhil

So this will remove the top level of the linktree/breadcrumbs? That may be satisfactory, or you may want to suppress the linktree if it has only one element, and show the whole thing otherwise. Many ways to skin this K@!

Hj Ahmad Rasyid Hj Ismail

Quote from: MrPhil on November 19, 2012, 10:27:33 AM
So this will remove the top level of the linktree/breadcrumbs? That may be satisfactory, or you may want to suppress the linktree if it has only one element, and show the whole thing otherwise. Many ways to skin this K@!

Can you share how to achieve that Phil?

MrPhil

I don't have the code to look at right now, but I recall that when displaying the linktree in the theme, there is an array of nodes (levels) that it loops through to present as links. You would simply look at the length of the array, and if it's 1, either exit or output a dummy linktree such as just  . If there are two or more nodes, the first one would be the "Forum name" or "Top", usually a link to the forum's home page, and you could skip that one if you wish (start processing at element 1 instead of 0). The last node given, which should be the current page, should not be an active link, but only a label. It's probably good practice to always show the current page, even if it isn't an active link.

Advertisement: