17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 3019 Views |
-
using widgets on normal pages

9 September 2008 at 9:53pm
Hello!
I want to use widgets on normal pages (for example widgetHtmlContentWidget-1.0.0.tar.gz). So until now
1.) I copied the folder into my root silverstripe folder,
2.) changed the files like here: http://doc.silverstripe.com/doku.php?id=widgets
3.) run "mysite.de/db/build/?flush=1"
4.) drag the widget into the widget field and edited the content (some text and a link)
5.) save&publishBut I can't see any changes. First when I create a "virtual Page" the "htmlWidget" is being displayed under the "virtual Page" link.
So what am I doing wrong? Its the same problem with other widgets too. Can someone help me please? I'm totally confused...
-
Re: using widgets on normal pages

11 September 2008 at 6:30pm
Im not sure you can add widgets to a virtual Page? What about a normal Page?
-
Re: using widgets on normal pages

11 September 2008 at 10:16pm
First of all thanks for the answer!
I don't add the widgets to the virtual Page, I want to add them to a normal Page.
The Problem is, that I can't see the widget on my site. I see it first, when I add a virtual Page to this site.
Here is a site with a virtual Page, you can see the widget too:
http://muppet.9dd.de/silverstripe/Here is a site without a virtual Page but you can't see the widget (even though you should see a widget):
http://muppet.9dd.de/silverstripe/about-us/So I think there is a variable or something like that what I have to turn on (and what turns on automatically by using a virtual Page)... am I right?
-
Re: using widgets on normal pages

11 September 2008 at 11:37pm
No sorry you confused me with virtual pages.. your issue isnt related to virtual pages at all. The thing is that on the home page you have a sub page called Contact us. Now because you have a subpage it automatically adds the menu to the page. On the About us page though you dont have any subpages under it so it doesnt include the menu section on the right.
What you want to do then is change the theme so instead of detecting whether there is a submenu or not you want it always to display that left hand side. So edit this file - themes/blackcandy/templates/Layout/Page.ss
to something like this
<div class="typography">
<% include SideBar %>
<div id="Content">
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
$Form
$PageComments
</div>
</div> -
Re: using widgets on normal pages

12 September 2008 at 12:18am
Thanks, that worked!
But now I have another widget problem. I can't remove a widget I set before. Clicking on save or save&publish lets the animation on the save button rotate endlessly.
So I put the line
Director::set_environment_type('dev');
into mysite/_config.php file and there comes a bunch of messages.....##############################################
FATAL ERROR: i18n::include_by_class: Class not found
At line 1258 in /var/www/silverstripe/sapphire/core/i18n.phpuser_error(i18n::include_by_class: Class not found,512)
line 1258 of i18n.phpi18n::include_by_class()
line 132 of Core.php_t(TITLE,Title (optional))
line 23 of HtmlContentWidget.phpHtmlContentWidget->getCMSFields()
line 64 of Widget.phpWidget->CMSEditor()
call_user_func_array(Array,Array)
line 404 of ViewableData.phpViewableData->XML_val(CMSEditor,,1)
line 26 of .cache.var.www.silverstripe.cms.templates.WidgetEditor.ssinclude(/var/www/silverstripe/silverstripe-cache/.cache.var.www.silverstripe.cms.templates.WidgetEditor.ss)
line 197 of SSViewer.phpSSViewer->process(HtmlContentWidget)
line 763 of ViewableData.phpViewableData->renderWith(WidgetEditor)
line 58 of Widget.phpWidget->EditableSegment()
call_user_func_array(Array,Array)
line 404 of ViewableData.phpViewableData->XML_val(EditableSegment,,1)
line 92 of .cache.var.www.silverstripe.cms.templates.WidgetAreaEditor.ssinclude(/var/www/silverstripe/silverstripe-cache/.cache.var.www.silverstripe.cms.templates.WidgetAreaEditor.ss)
line 197 of SSViewer.phpSSViewer->process(WidgetAreaEditor)
line 763 of ViewableData.phpViewableData->renderWith(WidgetAreaEditor)
line 15 of WidgetAreaEditor.phpWidgetAreaEditor->FieldHolder()
call_user_func_array(Array,Array)
line 404 of ViewableData.phpViewableData->XML_val(FieldHolder,,1)
line 72 of .cache.var.www.silverstripe.sapphire.templates.TabSetFieldHolder.ssinclude(/var/www/silverstripe/silverstripe-cache/.cache.var.www.silverstripe.sapphire.templates.TabSetFieldHolder.ss)
line 197 of SSViewer.phpSSViewer->process(TabSet)
line 763 of ViewableData.php
##############################################..ok, something is really wrong here I think... do you have a suggestion for me what I can do?
-
Re: using widgets on normal pages

19 September 2008 at 2:31pm
I am having a similar issue. It seems to be related to the HtmlContentWidget. It seems to be the "sticky" widget that will not delete. Other widgets, like the RSS widget, WILL delete for me.
I noticed this after doing a bunch of other customization around how Widgets were displayed on my site. I was afraid it was something I did, so I tried this with a vanilla install, and only added:
- Blog module (0.1)
- HtmlContentWidget (1.0.0)When I do this, I can add the HtmlContentWidget to the Blog, edit it, but not delete it.
The other Widgets will delete just fine.
The HtmlContentWidget is pretty straightforward, so I am not sure what it can be. Perhaps it is a conflict with tiny_mce? Maybe the page is not really getting submitted?
-
Re: using widgets on normal pages

1 December 2008 at 5:54am Last edited: 1 December 2008 5:55am
Any solutions so far?
| 3019 Views | ||
|
Page:
1
|
Go to Top |



