Using a MulitpleLookupField in MOSS '07 Layout Page - sharepoint

I have a page layout for my MOSS '07 site that I want put a MultipleLookupField in. The field will point to a multiple lookup column in my custom content type that points back to the pages library so I can have a "Related Articles" field.
I've gotten the field to show up correctly--it's even editable when the page is in edit mode! But when you click on the link that shows up there, it display the page's properties view instead of the page itself.
There's lots of properties on the control, but there's little documentation at MSFT as to what they do.
Does anyone know how to change the link's URL to the actual page instead of the properties view?
Here's the tag I'm using:
<SharePointWebControls:MultipleLookupField
ID="MultipleLookupField1"
FieldName="RelatedIssues"
runat="server"></SharePointWebControls:MultipleLookupField>
The link takes me to here: /Pages/Forms/DispForm.aspx?ID=6&RootFolder=*
I want it to take me here: /Pages/faq1.aspx

Unfortunately the lookup control is designed to be compatible with generic lists and does not understand that the document libraries have a file with a specific url associated.
You will probably have to find a custom lookup control on the web or roll your own.

Related

Kentico global webpart usage

We're moving from a pure portal to a portal/aspx development model. So I've been working on getting my .Master pages working and so far so good, except i need a way to have a Editable Text webpart applied globally.
Imaging a block of copy that sits in the header and appears on each page.
So, in portal, the copy is entered, and this is used through out the site, regardless of the template. I know i can add static copy to the parent .Master page, but this needs to be editable by an admin.
I've tried registering the Editable Text webpart on the ASPX page, but this doesn't seem to work correctly in the portal.
I believe the way to accomplish this is to create a single page template that has only the editable text webpart on it and does not inherit any other content. Then on your master page, add a page placeholder which uses that editable text webpart page template. This should then display that on every page. I've not done this approach before but hypothetically speaking it should work.
You could set up a Custom Setting.
The Kentico documentation has a great How-To guide for that.
After that, you can then just reference it using a macro like {% Settings.MyCustomSetting %} on each page - this also allows you to then control how the text is rendered on each section, in case some sections have specific markup you need to apply to the text block.
What is the reason of converting to Mixed mode? Is it better control over the basic page markup or something else?
Are you aware that you can customize CMSPages/PortalTemplate.aspx or replace it by your custom base page completely?
You may consider to use this approach, and if you need that because some pages are more complex, so it makes more sense to hardcode them, you can also implement them as some larger custom web parts.

Is there any way we can display web-content on public page randomly on page refresh?

We are using liferay 6.1
On Public page we want to display web-content in one portlet, but it should not be only selected one.
we want to display it randomly on page refresh. Like on page refresh it should display different web content from group of web content.
Any hint ?
Thanks.
Consider to use structures & templates: With structures you give some contents of an article - this might be alternative content, or just a description of a filter that you want to display.
A simple structure (that contains all of the content in just one article, not exactly what you ask for) just has repeatable HTML text fields. Edit all of them with the content you want to show alternating.
In your template you read an article with this content, generate a random number and only show the fragment from the content that the random number suggests.
Another way is to have a template that queries Liferay's API for several articles. Then you randomly select one of them and display it.
Templates can be written in Velocity, Freemarker or XSL. The nice thing is they're completely runtime-configurable.
Liferay Blogs, particularly those of James Falkner, have a few articles on how to work with the API from templates.
You can customized the "Web Content Display" portlet with a hook.
Add to config-page the "show randomized" checkbox, get the list of existing journal articles and choose random one of them.

How to add content query webpart to publishing page layout?

How do you add a content query webpart to a apublishing page layout and configure it to aggregate content from the pages in the page library??Can some one give me some insight on this?? Do I drop a content query webpart in SP designer?? If I do that, how do I configure the query??
Or do I add a content query webpart using ribbon and then export it and make customizations and import and drop that one on the page layout??? Please someone???
SCENARIO: I have to insert a content query webpart to a publishing page layout for Physicians profile site. Based on the page layout, there will be profile pages for each physicians. Now, each physician's' profile page will have his/her primary practice location name, address, phone etc as well as other multiple practice locations. Say Mr Tom's primary location is listed as hospital 'x' on his profile page, now I want to be able to also aggregate the names of all the other lawyers that also work in hospital 'X' as Tom's office members on his bio page using content query webpart on the page layout. How do I add and configure the webpart? I mean it's easy to add a content query webpart in just one page and configure it but I want to add it on a page layout so all the content pages will have its implementation as the pages are created by the authors.
say there are 10 profile pages in the pages library and 5 of them have at least one of their pracice locations as hopital X(they may be working at hospital Y, Z..etc at the same time too), now I want all 5 doctors name aggregated on the Tom's profile pages as his office members!?
Lots of question marks... yes you can add the content query webpart to a layout by using SP designer. This will COPY that webpart to every page that is created using that layout (or has its layout switched to that one). That makes the query to set up tricky because it needs to get the input on WHICH physician from somewhere - check out this article here. Using the PageFieldValue option should do the trick.
To change a CQWP, don't modify the default version. Instead, navigate to your XSL file in the Style Library in SPD and copy the ItemStyle.XSL and rename the copy to something else (such as CUSTOMItemStyle.xsl). Then go to a test page, place a blank CQWP, and click "Export". Open the .webpart file that you exported and modify the properties to link to your CUSTOMItemStyle.xsl.
Save the .webpart file and import it back to the gallery through the browser. Rename the new CQWP (to something like CUSTOM_CQWP.webpart or whatever).
Now you can modify the CUSTOMItemStyle.xsl to use custom XSL. Shape the XSL file how your requirements dictate, then in your test page, change the Web Part properties to use your new custom ItemSTyle. Once your web part look like you want it to, you can export it again and then reimport it back into the gallery and all your settings will be saved.
Now you can go to Designer and add this web part to your page layouts. When the user uses that layout, the web part is already placed on the page and wired up accordingly. Additionally, by usign this method, they can change teh web part properties of the web part or even delete the web part altogether if they don't want it, without affecting your page layout.
http://msdn.microsoft.com/en-us/library/bb447557(v=office.12).aspx

Default content editor in list form doesn't allow image alignment

I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.
You can't customize the LisForm web part, but you can add a "custom list form" to create a custom edit form. Maybe you haven't seen this article: http://weblogs.asp.net/jan/archive/2006/11/06/Custom-Edit-Forms-for-SharePoint-2007-Lists.aspx
Then you could do some javascript hackery to insert your own button which then calls something similar to existing RTE_InsertImage function to call a pop-up window and do whatever you need (you'll find this function in 12\template\layouts\1033\form.js)
I fail to see (or understand) your issue. I created a new announcements list, created a new item, inserted an image, aligned it to the right, viewed the item and it worked.
Then I proceeded to create a new custom column, choose multiple lines,enhanced rich text field, edited my list item, added an image, centered it, viewed and it was also working.
The only thing I noticed is that the "rich" control does not appears on non-IE browsers.

Change the action when clicking on a list item

I would like to change the destination URL when clicking on a list item / item title so it will no send me to view the item but will send me to a different URL base on the item.
I am not looking to replace the Links list but to use the list title as URL query filter.
Thanks
You will need to do it using the custom Page / Customize the View Page in the SharePoint Designed. Please refer to this article on how you can achieve it using the SPGridView control
I'm not totally clear on what you'd like to do (maybe screenshot mock ups would help?), but here's some general advice.
If you want to change the behaviour of a control then investigate the properties of the control as kusek has suggested. If the properties don't do what you need then try overriding the control to change what is rendered.
If the above doesn't work out or you want to change how these links render no matter where they appear on the page, then you need to look at a page-level solution. The most common are jQuery that can dynamically replace the URLs with JavaScript, or an HTTP module which is much more low level and will actually alter the HTML rendered to the page.
Hope this helps.

Resources