Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Virtual" slugs?
#1
I've worked with a different CMS and it has an interesting feature that I was trying to determine how to duplicate in GS. (I'm translating terms into GS speak so hopefully this ends up clear).

Lets say I want to create a plugin that creates a page of content.

To do this currently, as far as I know, I need to create a page, then on the page put in a plugin hook using some short code like (% whatever %). My plugin needs a add_filter hook and does a massage of $content to replace the code with the desired content.

This means my plugin parse gets called every page.

I'd like to instead have my plugin "register" a slug with GS, such that when the url is to that slug, a function in my plugin gets called to return the page content. Of course, the plugin configuration would also require picking a template to render the page with...or use the default template...?

This would allow a page to be generated with much less overhead on all the other pages.

Any suggestions/thoughts on this idea? If it worthwhile and how it could be implemented? (In the other software I used they call this feature "custom perma links".)

-Rob A>
Reply


Messages In This Thread
"Virtual" slugs? - by RobA - 2011-06-17, 00:49:59
"Virtual" slugs? - by mvlcek - 2011-06-17, 01:07:26
"Virtual" slugs? - by ccagle8 - 2011-06-17, 01:18:35
"Virtual" slugs? - by mvlcek - 2011-06-17, 01:25:59
"Virtual" slugs? - by Zegnåt - 2011-06-17, 01:28:27
"Virtual" slugs? - by RobA - 2011-06-17, 03:52:54
"Virtual" slugs? - by Zegnåt - 2011-06-17, 09:24:05



Users browsing this thread: 1 Guest(s)