I seem to remember having read about this, but it's virtually impossible to search for this because of the multitude of results the search return.
Is it possible to put the output of one or more (sidebar) plugins in a static page? I know there's serendipity_showPlugin, but I can't use that within the content area of a static page - or can I?
YL
Emit plugin's output to static pages content
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Emit plugin's output to static pages content
Hi!
You either need to install and use the serendipity_event_smartymarkup event plugin to put smarty code in the body, or you can create a custom staticpage article type with a custom .tpl file that already contains this showplugin code.
You can even make use of the new advacned static page custom config options so create your own radiobutton/dropdownl list with possible plugins you want the use to choose.
Regards,
Garvin
You either need to install and use the serendipity_event_smartymarkup event plugin to put smarty code in the body, or you can create a custom staticpage article type with a custom .tpl file that already contains this showplugin code.
You can even make use of the new advacned static page custom config options so create your own radiobutton/dropdownl list with possible plugins you want the use to choose.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Emit plugin's output to static pages content
That sounds like a plangarvinhicking wrote:or you can create a custom staticpage article type with a custom .tpl file that already contains this showplugin code
YL
Re: Emit plugin's output to static pages content
I have tried both options in a client's site, neither of them worked. I also tried both options of calling serendipity_showPlugin -- i.e. via class or id. Again, neither of them worked.garvinhicking wrote:You either need to install and use the serendipity_event_smartymarkup event plugin to put smarty code in the body, or you can create a custom staticpage article type with a custom .tpl file that already contains this showplugin code.
The plugin in question is the adduser sidebar plugin (because the event plugin's page doesn't mix with the individualized template), s9y version is 1.4.1, and all plugins are up to date thanks to spartacus.
Any hints or ideas?
YL
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Emit plugin's output to static pages content
Hi!
It does work (I used it for many clients), please show me what exactly you did.
Regards,
Garvin
It does work (I used it for many clients), please show me what exactly you did.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Emit plugin's output to static pages content
I'll retrace it step by step, just hop along 
1. Installed & configured serendipity_plugin_adduser plus the bundled event plugin. Moved the sidebar plugin to 'hidden' so it doesn't show up in the regular sidebar.
2. Modified the template's individual plugin_staticpage.tpl to include the plugin, called it registration.tpl and uploaded it to the template folder. Code:
3. Created a new static page type called "Registration", template name: registration.tpl
4. Created a new static page "as usual", but set the article type to the new one "Registration".
5. Saved it.
Now, if you go to that static page on the client's temporary site, you'll see what I see: h2 and precontent, but just an empty content div.
YL
1. Installed & configured serendipity_plugin_adduser plus the bundled event plugin. Moved the sidebar plugin to 'hidden' so it doesn't show up in the regular sidebar.
2. Modified the template's individual plugin_staticpage.tpl to include the plugin, called it registration.tpl and uploaded it to the template folder. Code:
Code: Select all
<div id="staticpage_{$staticpage_pagetitle|@makeFilename}" class="alpha clearfix grid_8 omega suffix_1">
{if $staticpage_articleformat}
<h2>{$staticpage_articleformattitle|@escape}</h2>
{else}
<h2>{$staticpage_headline|@escape}</h2>
{/if}
<div class="staticpage_precontent">{$staticpage_precontent}</div>
<div class="staticpage_content">
{serendipity_showPlugin class="serendipity_plugin_adduser"}
</div>
</div>4. Created a new static page "as usual", but set the article type to the new one "Registration".
5. Saved it.
Now, if you go to that static page on the client's temporary site, you'll see what I see: h2 and precontent, but just an empty content div.
YL
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Emit plugin's output to static pages content
Hi!
I believe you must specifically add some hidden attribute to the showplugin command. Does the showplugin command work inside your usual template index.tpl? If you can get it to work there, it should work in the staticpage as well.
For starters you might want to not set the plugin to hidden but to the left side, and use the side="left" paramter to the function?
The parameters should be documented on s9y.org
HTH,
Garvin
I believe you must specifically add some hidden attribute to the showplugin command. Does the showplugin command work inside your usual template index.tpl? If you can get it to work there, it should work in the staticpage as well.
For starters you might want to not set the plugin to hidden but to the left side, and use the side="left" paramter to the function?
The parameters should be documented on s9y.org
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Emit plugin's output to static pages content
AAAAAAAAAAAAAAAAAAAAAARGH!!!1garvinhicking wrote:HTH
You know what really helps with this? If I'm not logged in myself while calling that particular static page. Of course if does not show up if the visitor is already logged in. Doh.
I don't know and I'll never be able to reproduce if I actually did something different than this afternoon, but I think it's working now. Thanks for your patience
YL