Publishing a component doesn't publish the page? - tridion

When I publish a component in SDL Tridion, the page it's used on doesn't always publish. What conditions are needed in order to publish a component and have its page get published as well?

In either the SiteEdit or Content Manager Explorer (CME) interface, content editors can publish components or pages.
Publishing components will also publish the pages they are used on only if those pages are already published for the given publication target.
This may cause confusion especially with the page-focused SiteEdit (SDL Tridion inline editor) interface when selecting and publishing components instead of the entire page.
When in doubt, publish the page at least once to the appropriate publication target. Once the page is published, you can publish either the component or the page to that target to make updates.

Related

How can non-developers manage static html files that are a part of an asp.net mvc core app?

I need a way to let non-developers manage partial html pages within an asp.net mvc core app so the developers aren't being bothered with simple content updates like text and image swaps - ideally using wordpress tools / plugins we already have (ie. divi or some other method) to manage those html partials.
Mainly I want to be able to control the layout (header, footer, nav) with asp.net core but load the content either within or external to the application for each page.
Ideally when we make changes to these partials, we don't even need to rebuild the app and deploy, we can just save / publish the files and move on, leaving the developers focused on their application jobs and the web updates can be handled by designers and project managers. I need suggestions on best practice workflow in this situation and tool recommendations - would I need something like a Joomla or Drupal or would Wordpress (ideally) be able to author partial pages that the asp.net core app can then link to and display?
We are using wordress plugins so non web developers can build and manage web sites and pages with little to no coding. We also have a few web developers who are programming applications needed by the org. These developers are getting requests that don't / shouldn't require a developer to complete, but some of these pages live within an older asp.net application we are updating.
You have a number of options
Partial Views
The Views in ASP.NET are not compiled during deployment. You can edit them on the production server real-time without affecting any deployment process. They are compiled real-time. All you have to do is press ctrl-F5 in your browser to get the latest views from the file system.
Options for Workflow
Refactor your content so that the partial views contain only content that is to be edited by the non-developers.
This would mean that the partial views that the non-developers edit contain only html and no razor-type code.
If you really don't want the non-developers touching the source code directory, including the views, you can have the content that they provide stored in a database.
This way in your controllers, you can check the database for the content the non-developer has stored, and save it in a ViewBag variable. That way the non-developers are not touching any of the source code
Content Management
If your non-developers are going to have access to source code files, why not just five them FTP access. Updating Views real-time is perfectly fine. Or you can look into using Subversion source code client to keep a version history

Edit Razor views in separate project without rebuild

I have a setup where my Razor views are in one project (say, Project X) and have two other projects that use those views (an admin website and a user portal website). The problem with this setup is that editing a Razor view in Project X requires stopping and starting the debug session to see the changes on the websites.
Is there a problem with my setup, or is there some way I can edit the Razor views without having to do a full recompile?
(Note that editing a Razor view located directly in either of the web projects shows updates without having to restart)

Standard Master Page for new projects company wide

We are standardizing on Visual Studio 2010 for application development, along with implementing Team Foundation Server. What we are curious about is how can we setup a master page (i.e. site master) that will contain items we want on every page such as site navigation and company logo so that anytime someone in the company at any location creates a new project we can ensure they are using this site master page?
You can create a custom Project template.
You simply start a new project.
Add/modify as much as you need.
Use the "Export Template" wizard from the File menu.
This will create a zip file which will need to be installed on each desktop's copy of Visual Studio ("Documents\Visual Studio 2010\Templates\ProjectTemplates" usually), but once there will allow the user to select File>New Project and select "Corporate Standard Wesite" as the project type (for example).

How do I deploy an Asp.net web application to a Sharepoint 2010 site using WSP

Suppose I created a custom web application that consists of:
several assembly DLLs: web app, business logic, data services
multiple aspx pages and ascx custom controls that use them
custom configuration section
custom HTTP module
More or less the usual stuff.
I would like to deploy it to a particular sharepoint site under a certain subfolder. So if I access my sharepoint site via http://myserver:90/ (because I'm not using sites/some_site) I'd like my application to be available under http://myserver:90/webapp
I could manually add a virtual folder (not application because I would need to access some Sharepoint site's data) to my sharepoint site in IIS and manually edit site's web.config file to register my HTTP module and add my custom configuration section as well either putting my DLLs into GAC or put them in the _app_bin (so I don't have problems with CAS), but I don't think that's a good thing to do, because this web application may get deployed in an environment where this shouldn't/couldn't be possible.
So I figured I could build a WSP using Visual Studio 2010 and deploy it that way. But I don't have enough experience doing that.
I created a new sharepoint 2010 project. Is there a way I could add all non-executable application files (aspx, ascx) at once? I've seen the advanced tab of the WSP package where I can add my DLLs either to bin folder or GAC. I don't know whether I would also have to add any safe control and register certain classes?
So I suppose I need some pretty detailed and explanatory guidance here.
The only real way to do this would be to use the layouts folder to deploy your application via the wsp. This will let you depot any files that you would normally deploy with a.web application.
There are couple of problems however. The URL for your application will be http://SharePoint/somesite/_layouts/yourapp
This is a blessing and a curse. Your urls will be ugly but they will work under every SharePoint site. If your application depends on SharePoint context to function, that context will automatically be available based on the requesting URL.
To add a layouts folder under your share point project right click on the project and add a mapped folder to layouts. I would also recommend adding a sub folder under layouts for your application so that your application files don't conflict with the default files directly in the layouts folder.
For the http module, or any web.config modifications, you can use the spwebconfigmodification class.
Heres a walkthru: http://sharepointsolutions.blogspot.com/2006/12/using-spwebconfigmodificat_116736917110571614.html

Add asp.net pages into sharepoint

How to add or open the asp.net pages from inside sharepoint?
I found many info on the web about that, but they all fail or they are not clear. I appreciate your help :)
Your question is not clear, but if you want to customize look'n'feel of SharePoint page you should use SharePoint Designer.
In case you want to create some additional functionality from scratch the easiest way is to create a custom web part and then add it to a SharePoint page.
I think you want to include an aspx page to call either using an AJAX include or to be able to use the MOSS Object Model without having to add references etc?
if so then the following steps are necessary:
navigate to 12\layouts\
create a folder for the asp.net files
put the inline code files in
From sharepoint you can add a page viewer web part and reference it with the following url _Layouts//Filename.aspx
This technique will only work with inline code, if you wish to compile your code then you would create the site as normal and then add an application folder within the virtual directory of that particular site for example my site is called intranet:
navigate to c:\inetpub\wwwroot\wss\intranet
add your asp.net folder to this as a sub folder
in inetmgr right click the folder and create an application for it (use the same app pool as the sharepoint site)
ensure ALL DLLs from the sharepoint site bin folder exist within the apps bin folder or it will throw an error.
However, I would only ever use these methods as proof of concept and would ultimately use web parts, custom features and workflows to carry out the same functions.

Resources