Customising wc.pageturner - plone

Adding wc.pageturner to a plone 3.3.5 site, I can convert and view pdf files in the classic skin. I also have a custom skin (activated with skinswitcher) that has it's own main_template and is driven entirely by javascript.
To view a pdf file in this skin I embed a FlexPaperViewer object directly into a div. This renders the pdf correctly but the controls are not active (like scrolling, zooming, etc). When I compare the FlexPaperViewer objects rendered on the classic skin and custom skin, they are the same.
I have swfobject.js and flexpaper_flash.js in the main template head. Is other javascript I should include to get the controls working?
Thanks
Mike

Related

Force render of HTML

I'm using Xam.Plugins.WebView with static HTML on multiple pages of a carousel. I find that when a carousel page first shows a page the HTML takes a while to render and there's an ugly flash. This doesn't happen when using the default Forms WebView but I'm not using that because it doesn't do Javascript integration. Is there a way to trigger a rendering of HTML before it's visible? (Under the covers it's using WkWebView instead of UIWebView, which is what Forms WebView uses.)

Content editor webpart overrides Sharepoint CSS

Currently I use w3.css to a html page and use it in content editor webpart. The issue here is the CSS is affecting the whole page.How do I get the css to apply only to the content editor webpart.
I used the below link option 4 to add the content editor and the HTML file
http://sharepoint.hannahswain.eu/2014/10/10/adding-a-code-snippet-to-page-content-on-sharepoint-2013/
If you are using the same classes then of course all the elements that have those classes will be affected.
If in your webpart you assign unique css classes to the elements, only they will be affected. The web part is simply hosted on the page thus being a part of the page. If you tale a look at the source code of the page then you'll see that the web part is just another element on the same page.

Preserve original website formatting inside ckeditor?

I'm trying to do a simple wysiwyg editor and I am trying to edit this page.
I inserted that code into my editor and included the original css file from the website, yet it seems like ckeditor is putting its own tags around the overall content which breaks the original design. Is there a simple way to overcome this?
Thanks
Inline editing is what you want to do there. Simply render the website (component) in your admin panel, using your default, frontend styles and create inline editors for all editable fields. Finally serialize contents of editors.
CKEditor uses CSS from ckeditor/contents.css - you have to add your CSS there.
Your file is visible at http://makehugeprofit.com/editor/ckeditor/contents.css?t=E0LB and as you can see, it doesn't contain much. How did do "included the original css file from the website"? Merge it with contents.css and you'll have greater luck.
The editable area is an iframe and thus not in the same CSS space as your surrounding site.

XPM / UI : Creating new pages based on Page Type with copied components

I relatively simple question regarding XPM this time. It's about creating Page Type which editors could use to base their new website page on. When defining a Page Type, you can use an exisiting page to enable this as an example page, including its components. You can copy these components to enable editors to edit these freely without tampering with existing pages using these components as well.
On the SDL Live content docs they explain the following:
Change the setting from Include this Component Presentation to
Include a Component Presentation that contains a copy of this
Component. If you use this Component in multiple Component
Presentations on this Page, then saving the Page causes all of those
Component Presentations to have the setting you configured last for
any of those Component Presentations. A number of new controls appear.
This means that whenever an editor clicks 'new page' within XPM, this page type is available and the components that are defined inside it are copied with user-specific prefixes. You can define this inside the page defined as a Page Type itself, by clicking on the component presentations tab, then clicking on a component and selecting Page Type settings. note the following:
As you can see, the copy of the content is being created in 050 - Web - Global, which is, in our blueprint, the wrong publication. However, in the popup you cannot select the correct content location, only the one where the page type is residing.
I've tested this, also with the UI -specific blueprint context settings, where you should define where content and pages are created. However, when creating a new page, the components are copied inside 050 - web - global; the wrong publication. As we're moving to a training, I'd imagine that dynamically created components like this might clog the CMS with content in the wrong location, making it unusable for other publications. Is there a reason for this behaviour, and if so, a way to make this work properly?
If you set the BluePrint Context for Components to the Publication where you want them to be created, it should work as you expect.

ASP.NET webpage with basic html text

I have a specific Content Page (with an existing Master Page) that pretty much just has basic text wrapped with some <p>, <ul>/<li>, <h3>, <h4>, <blockquote> tags...like a blog post.
Is this ok to hardcode all of this html into my content page? Is there a better way (design-wise) to put text into an ASP.NET web page?
Yes, that's fine. Just make sure that if you're actually using a Content Page (in that it's a child to a Master Page), you keep all your HTML within the ContentPlaceHolders.
Look into MasterPages, which will allow you to define a basic template, and then each of your pages will consist of just a content section which you can fill in, thereby foregoing the need to have all that extra template code every single time.
Traditional HTML is perfectly fine with aspx pages.
You could create a master page (right click the project -> add new item -> select master page). After configuring this page, every time you create a new aspx page select the master page you just created as your masterpage template. Visual Studio will create a basic layout that includes <asp:content> tags. Just put your HTML markup there.
It depends on the objetive of the project... If you think that is going to grow into a big project you should considere using templates :)

Resources