I have a list of Tridion page URL's in an excel sheet, which should be unpublished on Click of a button for which I am developing a custom page. How do I read the URL from the publication.? For example, the URL looks like "https://www.example.com/us/en/abc/cde/index.html" (us/en - country/language; abc- folder in structure group, cde- subfolder in abc, index.html is the page) Now index.html should be unpublished.
How to Read the Tridion Page URL from the publication using Core Services?
118 Views Asked by hulda.rachel At
1
There are 1 best solutions below
Related Questions in TRIDION
- C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component
- Getting URL of published element in SDL Tridion
- Accessing Page Template Metadata from a Razor TBB
- SDL Tridion TOM.NET documentation
- Deployed binaries getting locked during SDL Tridion 2011 SP1 publishing
- SDL Tridion UI Using .Net master pages
- How to implement a Data Extender for populating a List in the component creation page?
- Tridion 2011 - Engine.GetObject overloads
- Unable to get list of publishing queue items. Timeout expired
- Content delivery service reports "Unable to retrieve desired results."
- Configure & Use Broker API in .Net Project
- Tridion CM reports "Couldn't retrieve data from 1 datasources"
- Exception while using SiteEdit with a Page Template in Template Builder
- Component link in custom metadata on Keyword
- Quickest way to comma separate a Tridion multivalue field
Related Questions in TRIDION-CORE-SERVICES
- How can we provide the path for the image file in order to create the multimedia component in server?
- Migration : if content migrated from tridion r5.XX to 2011?
- How to Read the Tridion Page URL from the publication using Core Services?
- How to recreate a WCF Service as Singleton instance with SimpleInjector (using Tridion)
- Getting Access is denied for the user NT AUTHORITY\NETWORK SERVICE.while accessing coreservice Tridion
- Error connecting Tridion with different user
- Getting error in Tridion while accessing core services
- How to get TCM URI of a category for KeywordFieldDefinitionData type fields?
- How to update a PDF without creating a new PDF?
- How to retrieve a PDF(document) from the Tridion File System and create a multimedia component out of it
- Is there a function to get the unpublish info of a page in Tridion CoreService?
- How to start 2660 port in IIS for Tridion Core Service connection using netTcp
- Tridion Core Service Reference becomes unknown after I 'Update' the service reference in VS 2010
- Error: Could not find default endpoint element that references contract
- Preventing special characters in tridion component field and changes in schema
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If I understand you correctly, you have the URL of a page and you want to find the corresponding page in Tridion. First the bad news: The core service (the CM API) does not support a 'find by url'. The quick and dirty approach would be to use the CD API to retrieve the page. This will give you Page back which has an ID property. You can then use the core service to unpublish the page.
You can also do it with a pure core service approach but it's a bit more work and it's slow. It goes like this:
Start from the top level directory (in your example 'us')
List all structure groups inside the root using a filter like this:
var filter = new OrganizationalItemItemsFilterData() { ItemTypes = new ItemType[] { ItemType.Page }, IncludePathColumn = true };
Use Linq to find the one with the top-level directory you're after
Move to the next directory and repeat with the child structure group you found