Plone has out of the box content type for externel links.
Does there exist such content type, way or add-on for internal links?
Real links, not aliases.
We wrote vs.alias
http://pypi.python.org/pypi/vs.alias
which refers to other internal objects through a reference field.
Smart Link? http://plone.org/products/redturtle.smartlink
Related
I have a localhost Drupal 7.x installation on my system. I have just explored with UI and created a custom Content type which defines a form with radio boxes. (Home --> Structure --> Content types --> Add Content Type, and so on.)
I am assuming these custom content types will be stored in local directories of Drupal core. I am not able to figure out where exactly these stay. I am curious to make changes to that file and see if there is any reflection, though I am not sure if it works that way.
Content types are data structure under Drupal so those are not stored in files but in Database.
If you add a field type file as part of a content type you can define where those files will be placed into the field type configuration
We're creating a database of files on a new Plone 4.3.2 website, using eea.facetednav as the main interface. In order to have multiple searchable "tags" plus additional information like publish year, article type, etc etc, we've created custom Dexterity content types for these "files". One of the fields on the Dexterity content type is to upload the actual file.
Everything was going swimmingly UNTIL I realized...
One of the basic functionalities of linking to "files" is now broken. Whereas we would expect creating an internal link to a file will prompt opening the file or downloading it when clicked, now it just takes you to the "view" for the new Dexterity content type, where there's a link to the actual file.
This is pretty cumbersome. Has anyone done this before, or found a way to have it automatically link to download the file? If we need to disable/scrap the Dexterity content type view in favor of the direct link, that's probably fine, but bonus points if you can think of a way to make this work both ways (i.e. have a linking method that takes it to the file and a linking method that takes it to the view).
This is the page I mean by "view", in case it's unclear:
... Off the top of my head, I can think of a weird Diazo solution of making a custom template that parses this view and automatically redirects to the file link, but that seems wrong/weird. Other thoughts?
I'll go for the bonus points, though I haven't fully tested this...
First, you have to designate your file field as the content type's "primary" field. Unfortunately this option doesn't show up in the UI so you have to edit the XML version of the schema (there's a button for this in recent versions of the dexterity control panel). Add xmlns:marshal="http://namespaces.plone.org/supermodel/marshal" as a namespace at the top, and add marshal:primary="true" to the field tag in question.
Then, find your type in portal_types and change the "Default view method" to ##download. (It usually starts out as view for Dexterity content types.) This should make the item's URL download the file rather than showing the normal view. It knows which field to use because you designated it as primary.
You can still access the normal view by adding /view to the end of the item's URL. If you want Plone to do this when linking to the type from navigation and folder contents (just like it does for built-in images and files), go to portal_properties/site_properties and add the type's id to the typesUseViewActionInListings list.
If I had to solve this problem, I'd take the "link" content type view in plone.app.contenttypes as a model.
When someone asks to see a link content type object, the view looks to see if the requestor has the Modify portal content permission on the link object. If they do, they see the conventional view, giving them the opportunity to edit. If they don't, the view returns a redirect to the target URL.
Your code would be simpler. After checking the permission, you'd only need to append ##download/field_name to get the redirect URL.
I have a Plone site using a local product which is common across several of our projects that provides a Dexterity content type which is entitled "Generic". I'm using it in a somewhat different way, however, so I'd like the content type to appear as "Specific" in the add content menu. (It's not necessary for the add/edit path to contain the adjusted type name.) Is there a programmatic way I can change the title for my installed version of the type?
Not sure if this is the best approach, but I've added an importStep that does:
portal_types['common.package.ContentTypeID'].title = 'Specific'
I have quite a few content types, but I need to change the available menus for a specific one.
No matter what I try, any changes to the available menus do not seem to save.
I have a suggestion for you.
Do you have a multi-site installation ? If you have multiple Domains, check under
Site-Information. (Normally there should be a message box with an info like "You may submit changes to the current domain at admin/structure/domain/view/3/config.")
Click admin/structure/domain/view/3/config
enable the menus for the appropriate content type in the Tabs at the end of the page
Possible solution: Change machine name of this Content Type to something different. This will probably involve updating some views etc. where you use this content type.
Ideally you'll need to find what is causing the lock of available menus so check all modules you've installed
I use i18n and I10n_client to translate English to Dutch in my web page, however some interface variables are not changing.
I searched 'Body' and tried to replace it with its Dutch word, but it doesn't take effect no matter what I do
http://imageshack.us/photo/my-images/831/searchbody1.png/
and
http://imageshack.us/photo/my-images/576/searchbody2.png
How can I change this type of built in interfaces? I can't change "Title" as well :(
you can download the translation file from
http://localize.drupal.org/
and import it in site_name/admin/build/translate/import
I hope it will help
Dutch is enough for me so I change the problematic labels to Dutch directly in the Edit content type form (go to Admin -> Content -> Content types, select edit for the one you want to change).
By setting a Title and Body label in the "Submission form settings" fieldset.
There is a bug report open for this, see http://drupal.org/node/1016006
I had the same problem with a german/chinese/english site. This is what helped for me
A very helpfull module is translation table. A perfect
table to do mass translation of
content types, cck taxonomy and menus
Goto /admin/build/translate/refresh
to recreate missing strings