I have a BrowseSupportFragment with multiple pages which are VerticalGridSupportFragments. The relevant code for this is essentially in this file here.
Sometimes these pages or VerticalGridSupportFragments don't have content to show. I'd like to display a brief message or image explaining this, but I cannot find how to modify the layout to include this text. I have found where I can add text and images to the Activity, but is there a way to make the text a part of the fragments individually rather than the activity?
Related
I made a website on Big Cartel and I need to add some text under the slideshow I am using on my homepage.
From what I gather the only way for me to do this is via code on HTML. I know nothing about coding so I was trying to look up tutorials on how to add text, but I could never get the text to display on the page.
How can I go about adding the text?
I tried using code I found online, just as an example so I can see how it's displayed. I couldn't get any text to display anywhere on the page.
I am using xslfo to generate PDF from my XML file, but whenever I edit something in my source documents, it will impact on pagination of output, that cause some indexing issue that runs according to there appearance.
Are there any attributes or elements to handle or to fix this behaviour?
I assume you have the following situation:
Initially, a page is almost filled with text.
The text is edited and becomes longer. Now it doesn't fit on one page any more.
You want to know if there's a way to automatically change the formatting so the text will fit on one page again.
Unfortunately you can't do this with XSL-FO alone. As far as I know, there is no way to specify "this block of text has to fit on one page, and if it doesn't fit, make the font size smaller until it fits".
You'd have to do some post-processing, along the line of 'count the pages in the PDF, if the page count is larger than X, change a variable in the FO template to make the text smaller and render again'.
Working on a project for a client. They have a PDF that has been broken into separate pages as images, and they want to have each of those images appear on a single page - at least 40 images for this one page alone.
So far, I've just been placing them individually. Each time you go to place an image using the rich editor, you start at the media root - and the way the media library has been structured, these images are buried very deep within subfolders. So it takes about 20 seconds of clicking, scrolling, and reading to find each image to place it.
These images are sequential and placed in order in the media library. Is there a way I can select a group of images and just drop them in? There are going to be literally hundreds of these, and it's a huge waste of my (and my client's) time placing images one-by-one.
Going along the lines of what TwentyGotoTen has said, I would:
Structure your images in the Media Library within folders (if you haven't already done so)
Create a sublayout/xsl rendering that contains a repeater to render the images
Add the control to the layout and set the DataSource of that control to the Media Folder
The code should then retrieve all child items from that folder and render as necessary.
You may need the use of the Sublayout Parameter Helper to access the datasource from ascx codebehind.
I'm assuming you just want the images to appear one after the other with nothing else inbetween. Rather than embedding images in rich-text perhaps you should consider creating a multilist field for the images in the template and create a rendering / sublayout to render them.
You can set a more suitable source for the multilist than the media root. This should make it a lot easier to select the images.
Mark van Aalst has created a custom image field that allows to do this a bit easier as well.
Have a read through this. This is also available on Sitecore's Marketplace: Multiple Images Selector
It will allow you to select your images through a multilist field, but it'll show the images as an image field with multiple images.
I think this is pretty much the solution TwentyGotoTen is talking about as well, but shows the thumbnail of the selected images as well.
I'm working on a Django app where the user uploads a space/tab/comma delimited text file. I display the text in a browser and the user can then interactively parse columns of delimited values which get highlighted with css as they change the settings. (Only a sample is displayed not the whole file!)
To highlight the selections I insert html/css code in and around the text but have to 'mark_safe' the text to get the html/css to render. I assume this opens security issues as even I, a complete noob could insert html in my input file and get it to render.
My Question:
Is there something I can use to strip html out of the text file immediately after I've uploaded it and before I render it in the browser? Would stripping '<' and '>' out be enough? What about something to disable .js if required?
I understand there are other well documented security measures I can take regarding file uploads. However I'm after a solution to my specific issue relating to me 'marking_safe' the input text I then render to the browser.
Django already has Automatic HTML escaping for this. Take a look at the link I posted in the docs. Hope this helps.
I purchased a template / theme from RocketTheme, but I can't figure out how to add content at a specific position.
The templates have "module positions" that collapse. I'd like to add some content at one of the module positions.
If I add articles, they seem to go into "mainbody". But I'd like to have content in other areas of the template.
How do I take some text, images, or other content, and get them to display in these other positions (i.e., TOP-A, or FEATURE-A, etc)?
I've tried this
Go to Extensions->Module Manager
Select "New", Select "Sections"
Under "Details", I select Position->Top-A
I give it a title.
Nothing seems to happen. I don't see anything new exposed in the admin UI, and I don't see a way to get any content into this newly defined section. What am I not understanding?
go to JED and look up html in module or content in module or content in component there are a bunch of them. http://extensions.joomla.org/search?q=module+content&start=20
Essentially
you create and save an article. Make sure it is saved to a section or category on your menu
open the module one of the paramaters will ask for the article id...decide which position and which pages you want it on and then publish.
You can also get modules that will take some or all of your articles in a category and then show them either as a slidedhow or one randomly when someone visits the page