Topic: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Does anyone know where I can see a full list of helpers for themes like Theme::, Page:: etc.

I have looked at http://docs.nibbleblog.com/post/helpers-for-themes/ and Constants, variables and objects

However when I examine the themes AO and Simpler to get an idea of how they work so I can create my own theme I find that they use things like Theme::meta_tags(); and <?php echo Page::content() ?>

I haven't seen these in any of the online documentation. Is there somewhere else I should be looking to understand how to make my own theme?

Thanks
Vaughan

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Just found it using a google search.

I needed to look at http://blog.nibbleblog.com/post/templates-variables/

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Hi, the link you have found is from 2012, so I don't really know if the list is updated with regards of the latest version.

Here you can find the code for all the helpers available: https://github.com/dignajar/nibbleblog/ … el/helpers

The way these functions work is actually pretty simple. The Theme:: (deprecated, I believe), Page::, etc. are the name of the PHP classes (or files) that contain the function. For instance, the blog.class.php file has a function that returns the blog's name, which would be called by using Blog::title() where you want it to appear

Hope this helps

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Thanks RMed for the above.

I am creating a website using Nibblleblog where 30 pages will be brochure type marketing material and I'm going to include a blog section.

I was looking to find out how to use a page slug in my main menu link navigation. Can I use something like
<a href="<?php echo $page['slug'] ?>"><?php Page::title() ?></a>

is this the best way?

Thanks

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

What I'm trying to achieve is :

<li class="<?php if (Page::title()=="Home") {echo "active"; } else  {echo "noactive";}?> bg-hover-color"><a href="<?php echo $page['slug']="Home" ?>">Home</a></li>
<li class="<?php if (Page::title()=="Services") {echo "active"; } else  {echo "noactive";}?> bg-hover-color"><a href="<?php echo $page['slug']="Services" ?>">Services</a></li>
<li class="<?php if (Page::title()=="Portfolio") {echo "active"; } else  {echo "noactive";}?> bg-hover-color"><a href="<?php echo $page['slug']="Portfolio" ?>">Portfolio</a></li>

{echo "active"; } else  {echo "noactive";} is so that I can have to tab button of the menu bar highlighted for the current page that I am on.

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

I remember a similar conversation I had in another post. Although I'm not quite sure about the {echo "active"; } and {echo "noactive";} parts, if you created the pages through the Nibbleblog admin panel, you could display their link and title the same way the pages plugin does. An example of this would be:

<a href="<?php echo $pages[1]['permalink']; ?>"><?php echo $pages[1]['title']; ?></a>

Where the index number can be found, if you have advanced options for posts enabled in settings, in the Position box (just below the editor) when you edit a page.

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Hi RMed,

Very useful tip.

However, when I create a page via Manage Page and use any of the themes like Echo, Notes II, Simpler 2 or Techie and I click on the Services tab for the page I created, I get:
Not Found

The requested URL /{mywebsite}/page/services/ was not found on this server.

I get this when I try:
<a href="<?php echo $pages[1]['services']; ?>"><?php echo $pages[1]['Services']; ?></a>

I'm at a loss to the solution.

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Sorry I should have explained better. Suppose that you have created 5 different pages, the way to access those pages would be by using their position (right under the editor when creating/editing the page), like so:

$pages[POSITION NUMBER HERE]

Now suppose that your Services page is in position 5. In order to get its link and title, you simply have to write:

<a href="<?php echo $pages[5]['permalink']; ?>"><?php echo $pages[5]['title']; ?></a>

Note that the only thing you change is the number, ['permalink'] and ['title'] are there to tell the page that you want its permalink and title.

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Thanks RMed,

My navigation with links to static pages are working now. Your help was much appreciated.

Vaughan

Re: Where Can I See A List Of Helpers for themes like Theme::, Page:: etc

Hi everyone,

@vaughanvw67, how did you get the "active" or "current" class for <li> tag in navigation menu?

English isn't my native language. Sorry for any mistakes you may find.