You are not logged in.
candyman, I’ve had a few ideas about this. I’m considering adding two or three new attributes to expand the plugin’s scope:
page_files (boolean) — if true, look for css/js files with the same name as the current page (template)section_files (boolean) — if true, look for css/js files with the same name as the current sectionand maybe even:
category_files (boolean) — if true, look for css/js files with the same name as the current article categoriesThe plugin would do a file_exists() check in the default css and js directories (defaults as set in the plugin prefs), then output <link /> elements for existing files.
Is that the kind of thing you were thinking of?
Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline
I’ve a page that implement geoblogging: only the map, no articles in that page. It would be useful to load the GoogleMap script for this page only: from this my previous request.
In the meantime I’ve found the stm_javascript and jmd_admin_js plugins also.
Anyway if you can add these features it would be useful, I think.
Last edited by candyman (2009-09-25 18:25:47)
Offline
Version 0.2 released
New features:
soo_required_files as a container tag containing additional files/forms to loadTxp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline
Thanks Jeff!
If I’ve understood well with the per-section feature I can load only a specific script for section, can’t I?
Last edited by candyman (2009-09-26 16:21:58)
Offline
Correct: only section.css and/or section.js (where “section” is the section name). However, if you wanted to load multiple files and/or forms for one section and that section shares a page with other sections you could do something like this:
<txp:soo_required_files> <txp:if_section name="this_section"> this_file.js, that_file.js, this_form </txp:if_section> </txp:soo_required_files>
Tag contents get loaded first, then per-page files, per-section files, finally per-article files/forms.
Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline
Version 0.2.1 released
Fixed per-page/section loading in sub-directory installations
Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline
I have installed the soo_plugin_pref. But I have no access to the preferences, because there is no Options link showing up in the plugin list. I have never seen such an Option link there. What I have done wrong? If someone could give me a cue, I would be thankful.
Felix
Offline
Sunfoot wrote:
I have installed the soo_plugin_pref. But I have no access to the preferences, because there is no Options link showing up in the plugin list. I have never seen such an Option link there. What I have done wrong? If someone could give me a cue, I would be thankful.
Sorry I missed this when it appeared. To see a plugin’s Options link the plugin must be activated, and you must be running Txp 4.2.0 or later.
Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline
Version 0.2.2 now available.
Tag contents can now include other Txp tags, allowing e.g. Txp conditional tags for further automation options.
So you can add files to the soo_required_files loading queue based on category, custom fields, etc.
Last edited by jsoo (2010-07-11 14:55:01)
Txp tags not doing what you expect? Learn to use a tag trace. And the Tag Reference.
Offline