Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DynPages plugin
#76
(2016-03-03, 22:02:49)linden Wrote: Is it possible to use this plugin for rendering a component together with i18n-specialpages? I mean it does work if i use for example (% component %) in the specialpage content. But would want to create a specialpage with new field, type "wysiwyg" and render the component in that field. Is this possible? Not sure if i am explaining well enough Smile

Nope, I suppose it's not explained well enough.

If you wanted to
  • create a special page type with an additional WYSIWYG field, e.g. 'wysiwyg'
  • and code to display both this field and the regular content (special page type tab 'view', text area 'HTML/PHP code for the display of a page'), e.g.
Code:
<div><?php get_special_field('wysiwyg'); ?></div>
<div><?php get_special_field('content'); ?></div>

you would have
  • created such a special page type,
  • created a test special page, e.g. with the following in the additional WYSIWYG field (note the curly braces for dynpages)
Code:
Test component: {% mycomponent %}
  • viewed the page
  • and seen that the component 'mycomponent' was correctly displayed

So please try to better explain what you want to achieve.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#77
Yes that was pretty much what i wanted to achieve. And i have done just as you said. But it will only render if i put the shortcode into the "page content" of the page but not if i put the shortcode in the specialpage wysiwyg field. 

Using {% mycomponent %} into the both fields:

<?php get_page_content(); ?> Works and renders the component

<?php get_special_field('wysiwyg'); ?> Does not render the component

Any idea what i am missing?
Reply
#78
Two general questions (having to do with i18n, components, dynpages):
1. In my understanding, components are like pages. Especially with dynpages you include them with a shortcode {% mycomponent %}
So, they are not theme-specific, in that they are not switched out if you change theme. Correct me if I am wrong.
There doesn't seem to be a need for theme-specific components anyway, since they usually contain code and can be put in the template as php, js, etc., and called from there at will.
1b. Where would you put supporting files for (site-wide) components? Is it consistent with the GS philosophy to put them into data/uploads/...?
The reason I am asking here and elsewhere, is that with GetSimple it is not generally useful to switch themes and still expect the new theme to sensibly display the same site. There are a few things such as Sidebar, tagline, header, footer, that seem to get some support out of the GS box, but I feel more can be done. The question is: should the matter be addressed by GS, some plugin, or some generally accepted techniques that GS already provides th hooks for (that I am not aware of as a relative newbie with a shallow knowledge of js, php, css)
2. Can you have a component 'mycomponent' and 'mycomponent_fr' where one will be called when the current language is French?
Reply
#79
(2016-12-01, 23:47:40)vanfruniken Wrote: 1b. Where would you put supporting files for (site-wide) components? Is it consistent with the GS philosophy to put them into data/uploads/...?

I'd probably put js, css, etc. into a theme/common directory and other files like pdfs into data/uploads.

(2016-12-01, 23:47:40)vanfruniken Wrote: 2. Can you have a component 'mycomponent' and 'mycomponent_fr' where one will be called when the current language is French?

yes, with the I18n plugin: get_i18n_component.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#80
Thanks, mvlcek
Reply
#81
hi,

i installed dynpages successfully - i use it on a blog page for blog posts of one certain category. it worked for about 30 minutes, then suddenly the page is showing all blog posts with all categories and xdebug is throwing the following errors:

[Image: xdebug-dynpages-category-page.png]

can you give me a hint on what causes the problem?
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels