Loading...
 
Skip to main content

Features / Usability


Can Tiki show content based on Freetag or Category? Oh and "subroutines"

Already making extensive use of Plugin "Group" to display different content based on user's group membership. Also see there is a similar plugin "Perms", which we're not using (as yet).

Is there a similar way to show content based on either the category a page belongs to or based on whether a page is free tagged?

Was hoping to "label" pages with one or more freetags or categories and display text indicating it needs additional work done to it.

Since we make some use of templates, I was hoping to put an "include" statement on each template to pull in the current version of the code from a "subroutine" page (yes, I'm a very old school developer from the dawn of computing) which would have the necessary plugin code to display or not the various messages.

Or is there another, better way to achieve this in a Tiki based solution? Was hoping to avoid having the community leaders having to actually edit each page to mark it as in need of attention... (We're currently running v4.3 at http://thereevesproject.org/data/tiki-index.phpQuestion)

Thanks in anticipation,

Martin

Merbster wrote:

Hello Martin.

we needed to show pages based on a category structure so I made a small hack for tikiwiki that enables this, since it cannot be achieved with standard wiki features. It's a HACK so you need to know your PHP.

https://dev.tiki.org/tiki-index.php?page=lookup%20perspective%20according%20to%20category%20IDsQuestion


Hi Merbster,

Thanks for your response. Unfortunately I'm not PHP fluent and I note its a hack for 6.3 and we're back level on 4.3. I'll study your code and see if we might adapt it, if the functionality is close to our needs.

Thanks again,

M


There are many ways to list pages based on categories or freetags depending on the version you are using. Generally, you will have more options for categories.
Louis-Philippe Huberdeau wrote:
There are many ways to list pages based on categories or freetags depending on the version you are using. Generally, you will have more options for categories.


Hi lphuberdeau,

Perhaps my initial post wasn't sufficiently clear, for which I apologise. I'm not interested in listing pages based on category or tag, but rather in causing the content of the page to change based its categories or tags.

Copy to clipboard
{GROUP(groups=>My_Group_6)}some content only for My Group 6 users{ELSE}other content{GROUP}
allows me to show page content based on a user's group membership. I was hoping for a similar plugin which was category based, such as
Copy to clipboard
{PAGE_IN_CATEGORY(category=>Missing_Links)}This page is missing links to other places. Please update this page to add them.{PAGE_IN_CATEGORY}


Martin

Hello again Martin.

If you are using tpl templates (smarty templates) you should be able to expose the php variable $objectCategoryIds which contains the current page's categories. and use smarty's control structures (if, then else etc) to make parts of your site dynamic, compared to the category of the page you are on.


I don't know if $objectCategoryIds exist in your version of tiki. But maybe you should think about upgrading? 😉