|
Forum > General SMF Forum
Creating linktrees for sub actions
(1/1)
shuban:
In my source file, I have something set up like this:
HOME > ACTION > SUBACTION
In the function that handles ACTION, I have added a link tree:
--- Code: ---$context['linktree'][] = array( 'url' => $scripturl . '?action=CUSTOM', 'name' => $context['page_title'] ); --- End code ---
In the subaction function, ?action=CUSTOM;sa=SUBACTION, I added:
--- Code: ---$context['linktree'][] = array( 'url' => $scripturl . '?action=CUSTOM;sa=SUBACTION', 'name' => $context['page_title'] ); --- End code ---
But when I go to the URL
/index.php?action=CUSTOM;sa=SUBACTION
I only see:
HOME > SUBACTION...
How do I make the tree build on the parent without having to do this inside the sub-action function?
--- Code: ---$context['linktree'][] = array( 'url' => $scripturl . '?action=CUSTOM', 'name' => $context['page_title'] );
$context['linktree'][] = array( 'url' => $scripturl . '?action=study;sa=mindset', 'name' => $context['page_title'] ); --- End code ---
SMFHacks:
I usually put in the main function. Like in the gallery I just define it as soon as call the main function GalleryMain Then in subactions just put the subaction in the linktree in it's function
shuban:
--- Quote from: SMFHacks on January 29, 2017, 09:08:51 pm ---I usually put in the main function. Like in the gallery I just define it as soon as call the main function GalleryMain Then in subactions just put the subaction in the linktree in it's function
--- End quote ---
Thanks, SMFHacks
Navigation
[0] Message Index |
No thumbnails on new uploads
by SMFHacks
March 27, 2024, 02:10:41 pm
|
Display the Contact Page for guests
by SMFHacks
March 27, 2024, 10:55:43 am
|
is it possible to add support for odysee.com
by fvlog19
March 21, 2024, 08:47:51 am
|
Request for admin notification
by davejo
March 10, 2024, 01:31:59 am
|
I need help with torrent upload
by Ineedsmfhelp
March 09, 2024, 10:01:13 pm
|
an idea for new mod (( content type with different display ))
by SMFHacks
February 27, 2024, 01:36:27 pm
|
[Mod] RSS Feed Poster
by SMFHacks
February 27, 2024, 11:57:18 am
|
find duplicate pictures
by fvlog19
February 14, 2024, 02:22:40 pm
|
Error uploading video.
by SMFHacks
February 08, 2024, 02:04:16 pm
|
Gallery icon as last added image
by fvlog19
February 01, 2024, 01:04:56 pm
|
|
|