2sxc App | Demo Content | Auto Fill - dotnetnuke

I have a series of modules based on the 'Content' App that I have created demo content for but as per the templates once I click edit the content data doesn't pre fill into the UI fields (which is something I'm trying to achieve).
I know the 'Content' App module templates are not Apps on their own like the 'FAQ'/'Accordion' Apps which I thought were capable of this pre fill presentation of demo content. How do you set an App's demo presentation content to display in the input fields of the UI?
I am currently looking at the Visual Query Designer but is this the only way to assign demo content to auto fill into the UI fields once a user clicks edit?
NOTE: My goal is to create a dnn template page of modules all displaying demo content (each assigned its own one) and then either copy this page or import it to another whereby the demo content has actually pre filled the modules on the new page once a user clicks on the edit button.
Thx

you can go to the "fields" of the content type and click on the "data type" ie sting, hyperlink etc and you should be able to set a default value

Related

Hiding a Web Content Viewer JSR 286 Portlet if no content is found

I have configured a JSR 286 portlet on my portal page which points to a content item. The content item has an expiry date. Once the content expires the user sees default warning message saying no content found for the selected site area.
I want this portlet should not be rendered if there is no content in the selected site area instead of showing a warning.
Use a Menu Component that is set to only display 1 item for your portlet. Then create a second content item that has a Presentation Template that just says something like this:
<div class="emptyPortlet" style="display:none;"> This is an empty template. </div>
*if you don't want to declare the style inside the tag, you could also specify .emptyPortlet { display: none;} inside your CSS file.
Publish this before your other item and then set the Menu Component to display based on Publish Date. This way, when you create another item that you want to display (which uses a different Presentation Template), it will have a more recent publish date and will be shown on the page. But, once that is expired, the only published item left to find will be this blank one, and with "display: none" it will essentially hide the entire portlet from the user.
You have a few options
Easiest would be to create a custom skin that shows or does not show depending on it's internal contents. just create your own skin to return nothing
Your other options include scraping it out of the response with a servlet filter or some other mechanism or stripping it from the page once you have started rendering

VisualForce page dont show custom fields that are not shown on Lead Layout

i'm new to VF. I try to add a VF block in the standard Lead Layout.
I have created new custom fields and they ONLY show in the VF block if they are also placed in the standard Lead Layout.
I want them to only appear on the VF block because i want to arrange them in certain way that is not possible with std. Laad Layout.
Any pointers how to have them only in VF?
Are you trying to add visualforce page to page layout(inline visualforce page)? if yes then you can easily remove those fields which you don't want to show on page layout and add them only to visualforce page.
Also if you are changing edit layout then I think you can not remove some fields from layout, such as required fields,etc.
Salesforce standard fields cannot be deleted. However, many standard fields can be removed from a page layout.
To remove a standard field from a page layout, please follow the steps below:
Click on:
Non-Enhanced Setup Menu - Setup | App Setup | Customize |
Enhanced Setup Menu - Setup | Build | Customize |
Click on the name of the Page Layout and select "Edit".
Click and drag the field from the layout into the box on the top of the page layout editor
Click "Save".
see for more information:
https://help.salesforce.com/HTViewSolution?id=000003629&language=en_US
Hope this helps.

Salesforce Custom field in Edit Page ONLY

I wanted to display a custom field as Read-Only on the Edit page ONLY of a custom object. This field should be hidden on the detail page. I tried wrapping the field in a section and display the section in Edit Page only(Page layout editor). That didn't work. I don't want to create a custom visual force page for the EDIT Page. Please suggest.
Thanks
Kumar
Unfortunately, there's no way to put a field on just edit or just detail. It's both or neither.
You have two options, custom Visualforce page as an Edit override is the easiest one, but if you want to leave the page layout editor as something useful to admins, there's also a very hacky option...
Create two record types, one that displays the field and one that doesn't. Create a new button that launches a Flow (with a return URL of the edit page for that object). The Flow should change the object's recordtype to the one that displays the field. Additionally, create a Process or trigger that changes the recordtype back to the one that does not display the trigger after you save the object.
I definitely recommend the VF page...

how to use view ticker in drupal

Does anyone explain me how I can use Views Ticker.I loaded modul but no idea how I should use it.please explain me step by step ,I am new on drupal
thank you.I wanna do somethink like this link
enter link description here
Create a "content type" and name it anything in my own case I will name it "news"
To create a content type, navigate to administration->structure->Content type-> add content type
You can add new fields to the content type if you wish. But in my own case I will just use the default settings, since I need only the titles to appear as flash news headlines so click "save"
Next create a new view and name it anything in my own case I will call it "headlines"
To create a new view navigate to administration->structure->views->add new view,
Now setup the new view with the following attribiutes; {View Name = headlines, show = content, of type = news, sort by = Newest First, create a page = uncheck, display format = Views Ticker, of = Titles (Linked)", use a pager = unchecked, create a block = checked} now click save and exit
Next navigate to Blocks and enable the block we just created through the views. Check for the block name "headlines" and specify the location where you will like to place the newly added block and save.
To enable the block navigate to Administration->Structure->Blocks
Now Navigate to view and select the new view we just added. In my own case it is called "headlines" and make sure "Format" is set to View Ticker, you can customize the settings of the View Tick by click settings.
Next add a news content type using the content type we just created. Add a title, a summary and a content. Then hit save
To add a news content type, navigate to Add content
Tip: Add at least two news contents in other to see the full effect of the view ticker
There is "Some" documentation in the readme file. check it out and see if it fits your requirements, http://drupalcode.org/project/views_ticker.git/blob/refs/heads/7.x-2.x:/README.txt
From first glance it seems like a views plugin so you could probably try changing the dispaly in the views settings.
Yes, you need to create a new View that pulls in some kind of content (i.e. Announcements). Under the "Display Format" when creating the View, you'll see an option of "Views Ticker", if you've installed the module correctly.
Based on the example you pointed to, you'll probably want to create a Block at the same time, that you can insert into the desired region.
Once you've created the View, you'll see a link for the Display Format "Settings". This is where you choose whether to make it scroll horizontally, vertically, speed, etc.
Once you updated and saved the view, you should go Admin > Structure > Blocks and insert your newly-made Views Ticker block into one of the regions (regions available will vary based on your Theme).
Then, as long as your permissions are correct, and you have actual content,you should see the scrolling ticker show up on the page(s) where the block shows up.
To use views ticker, it needs you to have an view which outputs some data.
I assume you have such a view. Then go to that view's edit page and set format to views ticker. You should have enabled views ticker module to get that option to formats list.
Then it will show you the settings window, in which you can set settings such as vertically, horizontally, BBC, etc styles for your data movement and respective speed etc.
After you did, click on apply button and then save button top of the view's edit page.
If all goes well it should display moving contents in the page/block related to that view.

Inline add/edit/delete data in views in Drupal 7

I am trying to create a content type (say Meter). Each Meter consists of a "Meter Reading". This meter reading content contains three fields, say title, date range and usage. I have a Panel page where I display all the Meter Readings related to a parent Meter. I have displayed the Meter Readings in a tabular format.
I want the user to be able to add new Meter Readings without going to the default Meter Readings creation page. Rather than the default form kind of page, the user should be able to enter the data in the table view provided and it should be automatically saved into the project itself.
So, I want the functionality to be like:-
Display all the meter readings with two links, i.e., Edit and Delete,
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline in the same table,
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be added dynamically to the table and the user should be able to make a new entry into it.
Is there a module in Drupal 7 for doing so?? I have already tried out several modules for this such as SlickGrid, jQGrid and jEditable
Any help would be great. Thanks in advance.
Am afraid am not aware about a module that does all that out of the box. But in case you carry on with custom coding you can have a look at the following:
Edit and Delete options per row in views
Use Views Megarow. For working example you can have a look at how its used in commerce backoffice. Please note that you need to write the form structure ( FORM api ) for the quick edit form in a custom module. The Views Megarow takes care of ajax populating the edit form, its submission in client side, and refreshing the original row after the response from server.
When the user clicks on Edit link, the meter reading row should become editable and the user should be able to make the changes inline
in the same table.
Views Megarow doesn't support inline editing. But another module as suggested by #nmc does it. Its editablefields. But it doesn't have any edit/delete button. You click on the text directly ( provided user has appropriate permission to edit the field data ) in view.
In case you are going to use editablefields, then you would have to add another delete button in view, which one confirmation would redirect to the page that triggered delete action.
Since delete button would redirect to a default confirmation page, you may want to code a custom delete action which may override this.
In the footer there should be a link for adding a new meter reading and when the user clicks on it, a new blank row should be
added dynamically to the table and the user should be able to make a
new entry into it.
I suggest creating a small ajax form. Create a "Add Meter Reading" button in it, which on submission would create a meter reading node in the server. The ajax form should have parent information in a hidden field ( i.e. the Meter id). The ajax response for this form could be another script to load/refresh the view on client side.
Client side code to refresh the view can be found in Views Autorefresh submodule in Views Hacks.
If using views megarow you would have to add another jquery function on ajax response after view is refreshed - Trigger edit button.
Otherwise you may have to add some classes or theme to newly created rows in view to bring them to focus.
It is important that the entire views refreshes, so that drupal behaviours are attached to the newly created entry in table.
I don't know if there is one module which will meet all your needs but you may be able to use some in combination.
Views Bulk Operations (VBO) - has Drupal 7 support
This module augments Views by allowing bulk operations to be executed
on the displayed rows. It does so by showing a checkbox in front of
each node, and adding a select box containing operations that can be
applied. Drupal Core or Rules actions can be used.
editablefields - Drupal 7 version in dev
This module allows CCK fields to be edited on a node's display (e.g.
at node/123), not just on the node edit pages (e.g. node/123/edit). It
also works within views etc. Anywhere a 'formatter' can be selected,
you can select editable (or click to edit).
editview - no Drupal 7 support yet but I thought I would mention it in case you're able to adapt the code yourself
Editview is a plugin for the Views module. It allows you to create a
view in which the nodes are editable, and new nodes can be created.

Resources