-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spin out baked-in syndication feeds to forms #1761
Comments
We should also add file download forms here, but it would rather be in 4.(8.)9 for me. |
I have tentatively added a <txp:header name="content-disposition" value="inline" />
<txp:header name="content-type" value="application/pdf" /> will try to display files as inline pdf rather than offering them to download. Actually, this is already possible via |
That's so simple and elegant. Love it. I haven't actually tested this but won't it trigger a 'form not found' in debugging/testing mode? This whole thing about 'essential' forms is still lurking over our heads, and it'd be nice to one day be able to axe them all and have Txp gracefully fallback on built-in default content if the form doesn't exist. Is there any way we can work towards that? |
My only reservation about this is that there's only one header form. Is there scope with what's available (globally, or passed in) to be able to do some conditional testing in the This concept would play very nicely with a possible use case that I'd like to bounce off you via email. |
All buffers are cleaned on valid files output, so no warnings should be issued. Not in my tests, at least. Yes, And yes, it would be cleaner, say, to have a pref containing possibly multiple file header forms. Absolutely nothing is set in stone, especially because it is more complex for rss/atom/etc output. |
Interesting. All good options. Let's see how this plays out with syndication feeds and go from there. |
Also, should it be at all a per theme thing? Because the forms are... |
I'm inclined to say yes. There's no other reliable way to do it. I keep going over in my head whether offering the ability to call a particular form from a particular theme is useful or not, and always talk myself out of it. Using per-theme forms also means the possibility of offering different behaviour in different sections if you mix and match themes across your site, and is also useful for improving handling of content during live/dev workflow upgrades. |
What're the downsides, out of interest? If we end up taking the Wordpress route of parent and child themes, that presumably becomes a legit use case for it. |
The downside is mainly head-scratching and lack of portability. If you had this in a template somewhere to "call in" a form from a different theme: <txp:output_form form="iron_man" theme="marvel" /> What happens if you export the current theme, bundle it up and make it available to the general populace? The end user gets broken theme access because that second theme isn't available in the destination system. Also, what happens if you rename the theme? Bang. Or try and use it in a dev situation with a different version number? Yes, things break if you rename a form but it's more localised and easier to debug. |
I'm fine with per theme forms, the question is per theme file output. Say, if we want some files to be displayed inline, we need to create a corresponding form for every theme attached to |
I think that complicates things too much. UNLESS we can figure out a way of checking a theme-specific content location first and THEN falling back on the 'global' 'files area before issuing a 404. Same with images. Per-theme images would be handy to bundle up if your theme relies on them (and we sort out the importer so it can inject assets into the DB without blatting existing content). Themers would need to be careful to reference images/files by name (assuming no clashes during import in the DB) and NOT by ID as there could be no guarantee that the IDs match when imported into someone else's database Or are you talking about a way of adding a theme dropdown to the Files panel (and |
I'm just saying that storing file output headers in forms complicates things. Say, you decide to display some pdf files inline rather than offering them for download (which is txp default behaviour). You create a form with I'd say that the file output format is rather a site owner choice than a theme dependent feature. But I have very little 'real world' web dev experience. |
I concur. Leave it to the site admin to decide. |
Where do we store it then, if not in a form (because forms belong to themes)? A pref, something else? |
Currently we offer Atom and RSS syndication formats, they work just fine and the code hasn't been touched in a while. Any modification to the feed generator will trigger a notification in Diagnostics that core files have been modified. Some knowledge of PHP and SQL is required to modify the files.
If we spin out the generator to forms, we could easily extend scope to offer additional formats like JSON Feed, or leave as an exercise to the admin for any flavour-of-the-month and / or uncommon format. Similarly, the admin could enable or disable each syndication type, rather than a blanket on or off for syndication.
Considerations:
I'll close #1536 since it's now covered under this issue.
The text was updated successfully, but these errors were encountered: