News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Creating pages

Started by cpf, November 28, 2014, 10:16:46 PM

Previous topic - Next topic

cpf

Is there a way to create a basic page of content that would display in the main navigation, or will that be accomplished by a mod?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Kindred

Like 2.0.x, that will require a mod or custom coding on your part.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

There is no way to do this built in, not in 2.0 or 2.1.

You would need a mod to do it and I don't think any exist for 2.1 yet. In any case, none of the mods seem to actually do both 'actual page content' and 'providing navigation to that page in the menu'.

Kindred

#3
Although, it actually should be pretty simple to do both, since adding a menu item is child's play with hooks...


But, you should not expect any mods for 2.1 until at least rc1
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Simple as it may be... none of the mods ever do it.

Illori

there is https://github.com/margarett/CustomAction which should work decently on 2.1 and uses hooks.

cpf

Quote from: Illori on November 29, 2014, 06:15:43 AM
there is https://github.com/margarett/CustomAction which should work decently on 2.1 and uses hooks.

It failed.  I'll have to check it out.
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Illori


cpf

Quote from: Illori on November 30, 2014, 06:48:18 AM
what failed?

3. Execute Modification   ./Sources/ManagePermissions.php   Test failed
      1.   Add After   ./Sources/ManagePermissions.php   Test failed
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

Illori


werano

thanks for the link
werner

werano

unable to instal on smf 2.0.9  :'(

margarett

Because it's for 2.1 only? ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Mstcool

Simpleportal gas a page making feature :P

stmaxx

Yes .... As Kindred has pointed out this can be done using a mod and or custom coding of the Theme, I would think the best way would be via the theme as, Bloc and some other have done in the past, and are possibly thinking  on this for the future.

But I think if you go through all that, you should also add as Bloc did the, blog and gallery and maybe a blank page, all controllable through the Current theme settings.

or what was done with the contact page mod. (works well emulated on the Beta), no errors at all so far! 
the blank page will then need to be edited.

regards,
Maxx

Kindred

#15
stmaxx.... WHAT?

hmmm....  I reverse what I said previously (post edited)

However, your post isn't very clear...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Apart from the fact that themes can create pages - as Bloc's themes used to do - by way of the wrapaction functionality.

Kindred

really? well, heck. I take it back then... it can be done
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

stmaxx

Quote from: Kindred on December 23, 2014, 11:39:56 AM
stmaxx.... WHAT?

once again, what you posted really made no actual sense when compared to the OP question and the answers already in the thread...

You never create new pages "via the theme"

I have no idea what you have against me, what's up? If I did something  to you please let me know!

regards,
Maxx


Arantor

Yup, it can definitely be done. I forget which of Bloc's themes support it but if you look in index.php after the main action array, there is a definition of WrapAction which is set up by a theme for a theme to add new actions of its own to the list.

A very under-used feature, I think, mostly because I don't think anyone knows it's there.

Advertisement: